Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 247b28499c443e092731ffba814075f2 > files > 1243

mpqc-html-2.3.1-9mdv2010.0.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>MPQC: Running MPQC</title>
<link href="tabs.css" rel="stylesheet" type="text/css">
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.9 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li class="current"><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
</div>
<div class="contents">
<h1><a class="anchor" name="mpqcrunning">Running MPQC </a></h1>This chapter explains how to run MPQC in a variety of environments.<p>
The first two sections give general information on running MPQC:<p>
<ul>
<li>
<a class="el" href="mpqcrunning.html#mpqccomline">Command Line Options</a> </li>
<li>
<a class="el" href="mpqcrunning.html#mpqcenv">Environmental Variables</a> </li>
</ul>
<p>
The final sections given specific information on running MPQC in different environments:<p>
<ul>
<li>
<a class="el" href="mpqcrunning.html#mpqcshmem">Shared Memory Multiprocessor with SysV IPC</a> </li>
<li>
<a class="el" href="mpqcrunning.html#mpqcpthr">Shared Memory Multiprocessor with POSIX Threads</a> </li>
<li>
<a class="el" href="mpqcrunning.html#mpqcmpi">Shared or Distributed Memory Multiprocessor with MPI</a> </li>
<li>
<a class="el" href="mpqcrunning.html#mpqcmp2">Special Notes for MP2 Gradients</a> </li>
<li>
<a class="el" href="mpqcrunning.html#mpqcmp2r12">Special Notes for MP2-R12 energies</a> </li>
<li>
<a class="el" href="mpqcrunning.html#mpqccca">Special Notes for CCA Components</a> </li>
</ul>
<h2><a class="anchor" name="mpqccomline">
Command Line Options</a></h2>
MPQC can be given options followed by an optional input file name. If the input file name is not given, it will default to "mpqc.in". The following command line options are recognized:<p>
<dl>
<dt><code>-o</code></dt>
<dd>Gives the name of the output file. The default is the console.<p>
</dd>
<dt><code>-i</code></dt>
<dd>Convert a simple input file to an object oriented input file and write the result to the ouput. No calculations are done.<p>
</dd>
<dt><code>-messagegrp</code></dt>
<dd>A ParsedKeyVal specification of a MessageGrp object. The default depends on how MPQC was compiled.<p>
</dd>
<dt><code>-memorygrp</code></dt>
<dd>A ParsedKeyVal specification of a MemoryGrp object. The default depends on how MPQC was compiled.<p>
</dd>
<dt><code>-threadgrp</code></dt>
<dd>A ParsedKeyVal specification of a ThreadGrp object. The default depends on how MPQC was compiled.<p>
</dd>
<dt><code>-integral</code></dt>
<dd>A ParsedKeyVal specification of an Integral object. The default is IntegralV3. Note that some MolecularEnergy specializations require specific choices of Integral specializations and may not work with IntegralV3.<p>
</dd>
<dt><code>-l</code></dt>
<dd>Sets a limit on the number of basis functions. The default is zero, which means an unlimited number of basis functions.<p>
</dd>
<dt><code>-W</code></dt>
<dd>Sets the working directory. The default is the current directory.<p>
</dd>
<dt><code>-c</code></dt>
<dd>Check the input and exit.<p>
</dd>
<dt><code>-v</code></dt>
<dd>Print the version number.<p>
</dd>
<dt><code>-w</code></dt>
<dd>Print the warranty information (there is no warranty).<p>
</dd>
<dt><code>-d</code></dt>
<dd>If a debugger object was given in the input, start the debugger running as soon as MPQC is started.<p>
</dd>
<dt><code>-h</code></dt>
<dd>Print a list of options.<p>
</dd>
<dt><code>-f</code></dt>
<dd>The name of an object-oriented input file. The default is <code>mpqc.in</code>. This cannot be used if another input file is specified. This option is deprecated, as both input file formats can be read by given the input file name on the command line without any option flags.<p>
</dd>
<dt><code>-cca-path</code></dt>
<dd>A colon-separated list of directories in which CCA component libraries may be found.<p>
</dd>
<dt><code>-cca-load</code></dt>
<dd>A colon-separated list of sidl class names for CCA components which will be instantiated from the libraries found in the path given by <code>-cca-path</code><p>
</dd>
</dl>
<p>
Some MPI environments do not pass the command line to slave programs, but supply it when MPI_Init is called. To make MPQC call MPI_Init with the correct arguments as early as possible use the configure option <code>--enable-always-use-mpi</code>.<h2><a class="anchor" name="mpqcenv">
Environmental Variables</a></h2>
MPQC looks at five environmental variables to set up communication, find library files, and specify the default Integral object. Machine specific libraries and utilities to run programs in parallel might look at other environment variables as well. The five that apply on all platforms are:<p>
<dl>
<dt><code>SCLIBDIR</code></dt>
<dd>The name of the library directory. See the GaussianBasisSet documentation and look below for more information.<p>
</dd>
<dt><code>MESSAGEGRP</code></dt>
<dd>A ParsedKeyVal specification of a MessageGrp object. The default depends on how MPQC was compiled. See the MessageGrp class documentation for more information.<p>
</dd>
<dt><code>MEMORYGRP</code></dt>
<dd>A ParsedKeyVal specification of a MemoryGrp object. The default depends on how MPQC was compiled and the MessageGrp in use.<p>
</dd>
<dt><code>THREADGRP</code></dt>
<dd>A ParsedKeyVal specification of a ThreadGrp object. The default depends on how MPQC was compiled.<p>
</dd>
<dt><code>INTEGRAL</code></dt>
<dd>A ParsedKeyVal specification of an Integral object. The default is IntegralV3. Note that some MolecularEnergy specializations require specific choices of Integral specializations and may not work with IntegralV3.<p>
</dd>
</dl>
<p>
By default, MPQC tries to find library files first in the <code>lib</code> subdirectory of the installation directory and then the source code directory. If the library files cannot be found, MPQC must be notified of the new location with the environmental variable <code>SCLIBDIR</code>.<p>
For example, if you need to run MPQC on a machine that doesn't have the source code distribution in the same place as it was located on the machine on which MPQC is compiled you must do something like the following on the machine with the source code:<p>
<pre>
cd mpqc/lib
tar cvf ../sclib.tar basis atominfo.kv
</pre><p>
Then transfer <code>sclib.tar</code> to the machine on which you want to run MPQC and do something like<p>
<pre>
mkdir ~/sclib
cd ~/sclib
tar xvf ../sclib.tar
setenv SCLIBDIR ~/sclib
</pre><p>
The <code>setenv</code> command is specific to the C-shell. You will need to do what is appropriate for your shell.<p>
The other three keywords specify objects. This is done by giving a mini ParsedKeyVal input in a string. The object is anonymous, that is, no keyword is associated with it. Here is an example:<p>
<pre>
setenv MESSAGEGRP "&lt;ShmMessageGrp&gt;:(n = 4)"
</pre><h2><a class="anchor" name="mpqcshmem">
Shared Memory Multiprocessor with SysV IPC</a></h2>
By default, MPQC will run on only one CPU. To specify more, you can give a ShmMessageGrp object on the command line. The following would run MPQC in four processes: <pre>
mpqc -messagegrp "&lt;ShmMessageGrp&gt;:(n = 4)" input_file
</pre><p>
Alternately, the ShmMessageGrp object can be given as an environmental variable: <pre>
setenv MESSAGEGRP "&lt;ShmMessageGrp&gt;:(n = 4)"
mpqc input_file
</pre><p>
If MPQC should unexpectedly die, shared memory segments and semaphores will be left on the machine. These should be promptly cleaned up or other jobs may be prevented from running successfully. To see if you have any of these resources allocated, use the <code>ipcs</code> command. The output will look something like:<p>
<pre>
IPC status from /dev/kmem as of Wed Mar 13 14:42:18 1996
T     ID     KEY        MODE       OWNER    GROUP
Message Queues:
Shared Memory:
m 288800 0x00000000 --rw-------  cljanss     user
Semaphores:
s    390 0x00000000 --ra-------  cljanss     user
s    391 0x00000000 --ra-------  cljanss     user
</pre><p>
To remove the IPC resources used by <code>cljanss</code> in the above example on IRIX, type:<p>
<pre>
ipcrm -m 288800
ipcrm -s 390
ipcrm -s 391
</pre><p>
And on Linux, type:<p>
<pre>
ipcrm shm 288800
ipcrm sem 390
ipcrm sem 391
</pre><h2><a class="anchor" name="mpqcpthr">
Shared Memory Multiprocessor with POSIX Threads</a></h2>
By default, MPQC will run with only one thread. To specify more, you can give a PthreadThreadGrp object on the command line. MPQC is not parallelized to as large an extent with threads as it is with the more conventional distributed memory model, so you might not get the best performance using this technique. On the other the memory overhead is lower and no interprocess communication is needed.<p>
The following would run MPQC in four threads:<p>
<pre>
mpqc -threadgrp "&lt;PthreadThreadGrp&gt;:(num_threads = 4)" input_file
</pre><p>
Alternately, the PthreadThreadGrp object can be given as an environmental variable: <pre>
setenv THREADGRP "&lt;PthreadThreadGrp&gt;:(num_threads = 4)"
mpqc input_file
</pre><h2><a class="anchor" name="mpqcmpi">
Shared or Distributed Memory Multiprocessor with MPI</a></h2>
A MPIMessageGrp object is used to run using MPI. The number of nodes used is determined by the MPI run-time and is not specified as input data to MPIMessageGrp.<p>
<pre>
mpqc -messagegrp "&lt;MPIMessageGrp&gt;:()" input_file
</pre><p>
Alternately, the MPIMessageGrp object can be given as an environmental variable: <pre>
setenv MESSAGEGRP "&lt;MPIMessageGrp&gt;:()"
mpqc input_file
</pre><p>
Usually, a special command is needed to start MPI jobs; typically it is named <code>mpirun</code>.<h2><a class="anchor" name="mpqcmp2">
Special Notes for MP2 Gradients</a></h2>
The MP2 gradient algorithm uses MemoryGrp object to access distributed shared memory. The MTMPIMemoryGrp class is the most efficient and reliable implementation of MemoryGrp. It requires a multi-thread aware MPI implementation, which is still not common. To run MP2 gradients on a machine with POSIX threads and an multi-thread aware MPI, use:<p>
<pre>
mpqc -messagegrp "&lt;MPIMessageGrp&gt;:()" \
     -threadgrp "&lt;PthreadThreadGrp&gt;:()" \
     -memorygrp "&lt;MTMPIMemoryGrp&gt;:()" \
     input_file
</pre><p>
or<p>
<pre>
setenv MESSAGEGRP "&lt;MPIMessageGrp&gt;:()"
setenv THREADGRP "&lt;PthreadThreadGrp&gt;:()"
setenv MEMORYGRP "&lt;MTMPIMemoryGrp&gt;:()"
mpqc input_file
</pre><h2><a class="anchor" name="mpqcmp2r12">
Special Notes for MP2-R12 energies</a></h2>
<b>Distributed Memory</b><p>
The MP2-R12 energy algorithm is similar to the MP2 energy algorithm that uses MemoryGrp object to access distributed memory. Hence the MTMPIMemoryGrp is the recommended implementation of MemoryGrp for such computations (see <a class="el" href="mpqcrunning.html#mpqcmp2">Special Notes for MP2 Gradients</a>). <p>
<b>Disk I/O</b><p>
In contrast to the MP2 energy and gradient algorithms, the MP2-R12 energy algorithm may have to use disk to store transformed MO integrals if a single pass through the AO integrals is not possible due to insufficient memory. The best option in such case is to increase the total amount of memory available to the computation by either increasing the number of tasks or the amount of memory per task or both.<p>
When increasing memory further is not possible, the user has to specify which type of disk I/O should be used for the MP2-R12 energy algorithm. It is done through the <code>r12ints</code> keyword in input for the MBPT2_R12 object. The default choice is to use POSIX I/O on the node on which task 0 resides. This kind of disk I/O is guaranteed to work on all parallel machines, provided there's enough disk space on the node. However, this is hardly most efficient on machines with some sort of parallel I/O available. On machines which have an efficient implementation of MPI-IO the <code>r12ints</code> should be set instead to <code>mpi-mem</code>. This will force the MBPT2_R12 object to use MPI-IO for disk I/O. It is user's responsibility to make sure that the MO integrals file resides on an MPI-IO-compatible file system. Hence the <code>r12ints_file</code> keyword, which specifies the name of the MO integrals file, should be set to a location which is guaranteed to work properly with MPI-IO. For example, on IBM SP and other IBM machines which have General Parallel File System (GPFS), the user should set <code>r12ints = mpi-mem</code> and <code>r12ints_file</code> to a file on a GPFS file system. <p>
<b>Integral object</b> <br>
<p>
At the moment, MBPT2_R12 objects require specific specialization of Integral, IntegralCints. Thus in order to compute MP2-R12 energies, your version of MPQC needs to be compiled with support for IntegralCints. A free, open-source library called <code>libint</code> is a prerequisite for IntegralCints (see <a class="el" href="compile.html">Compiling</a>). In order to use IntegralCints as the default Integral object, add <code>-integral "&lt;IntegralCints&gt;:()"</code> to the command line, or set environmental variable <code>INTEGRAL</code> to <code>"&lt;IntegralCints&gt;:()"</code>. <h2><a class="anchor" name="mpqccca">
Special Notes for CCA Components</a></h2>
<b>Common Component Architecture (CCA)</b><p>
Portions of MPQC functionality are being packaged into CCA components. For general overviews of CCA technology and framework usage, please see <a href="http://www.cca-forum.org">www.cca-forum.org</a> (the tutorial in particular) and the <a href="http://www.cca-forum.org/~cca-chem/doc-apps-0.2/index.html">cca-chem-apps</a> documentation. MPQC components may be utilized directly within the ccaffeine framework, while some components may be instantiated and used within MPQC itself, making use of an embedded CCA framework. <p>
<b>CCA Runtime Environment</b><p>
For MPQC runs utilizing embedded components, the runtime environment for the CCA framework must be specified. The colon-separated path used to locate component libraries must be specified either using the <code>-cca-path</code> command-line option or using the <code>cca_path</code> key within the <code>mpqc</code> section of a keyval input. The colon-separated list of component sidl class names which will be referenced within the input must be specified using either the <code>-cca-load</code> command-line option or using the <code>cca_load</code> key within the <code>mpqc</code> section of a keyval input. If defaults for the cca-path and cca-load options are desired, <code>do_cca</code> must be set to <code>yes</code> in the keyval input. </div>
<hr>
<address>
<small>

Generated at Wed Oct 14 14:12:12 2009 for <a
href="http://www.mpqc.org">MPQC</a>
2.3.1 using the documentation package <a
href="http://www.doxygen.org">Doxygen</a>
1.5.9.

</small>
</address>
</body>
</html>