Sophie

Sophie

distrib > Mandriva > 9.1 > ppc > media > contrib > by-pkgid > 263386785cefb9ae5d63b926d214d809 > files > 1291

mpqc-2.1.2-4mdk.ppc.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta name="robots" content="noindex">
<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>Running MPQC</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body bgcolor="#ffffff">
<!-- Generated by Doxygen 1.2.5 on Mon Oct 14 14:18:08 2002 -->
<center>
<a class="qindex" href="index.html">Main Page</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="annotated.html">Compound List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; <a class="qindex" href="pages.html">Related Pages</a> &nbsp; </center>
<hr><a name="mpqcrun"><h2>Running MPQC</h2></a>
 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 href="mpqcrun.html#mpqccomline">Command Line Options</a> <li> <a href="mpqcrun.html#mpqcenv">Environmental Variables</a> </ul>

<p>
The final sections given specific information on running MPQC in different environments:
<p>
<ul>
 <li> <a href="mpqcrun.html#mpqcshmem">Shared Memory Multiprocessor with SysV IPC</a> <li> <a href="mpqcrun.html#mpqcpthr">Shared Memory Multiprocessor with POSIX Threads</a> <li> <a href="mpqcrun.html#mpqcmpi">Shared or Distributed Memory Multiprocessor with MPI</a> <li> <a href="mpqcrun.html#mpqcmp2">Special Notes for MP2 Gradients</a> </ul>

<p>
<a name="mpqccomline"><h2>Command Line Options</h2></a>

<p>
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 compact>

<p>
<dt><code>-o</code><dd>Gives the name of the output file. The default is the console.
<p>
<dt><code>-i</code><dd>Convert a simple input file to an object oriented input file and write the result to the ouput. No calculations are done.
<p>
<dt><code>-messagegrp</code><dd>A ParsedKeyVal specification of a MessageGrp object. The default depends on how MPQC was compiled.
<p>
<dt><code>-memorygrp</code><dd>A ParsedKeyVal specification of a MemoryGrp object. The default depends on how MPQC was compiled.
<p>
<dt><code>-threadgrp</code><dd>A ParsedKeyVal specification of a ThreadGrp object. The default depends on how MPQC was compiled.
<p>
<dt><code>-l</code><dd>Sets a limit on the number of basis functions. The default is zero, which means an unlimited number of basis functions.
<p>
<dt><code>-W</code><dd>Sets the working directory. The default is the current directory.
<p>
<dt><code>-c</code><dd>Check the input and exit.
<p>
<dt><code>-v</code><dd>Print the version number.
<p>
<dt><code>-w</code><dd>Print the warranty information (there is no warranty).
<p>
<dt><code>-d</code><dd>If a debugger object was given in the input, start the debugger running as soon as MPQC is started.
<p>
<dt><code>-h</code><dd>Print a list of options.
<p>
<dt><code>-f</code><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>

</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 on start-up, instead of when an MPIMessageGrp is created, name the executable mpqc-mpi.
<p>
<a name="mpqcenv"><h2>Environmental Variables</h2></a>

<p>
MPQC looks at four environmental variables to set up communication and find library files. Machine specific libraries and utilities to run programs in parallel might look at other environment variables as well. The four that apply on all platforms are:
<p>

<dl compact>

<p>
<dt><code>SCLIBDIR</code><dd>The name of the library directory. See the GaussianBasisSet documentation and look below for more information.
<p>
<dt><code>MESSAGEGRP</code><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>
<dt><code>MEMORYGRP</code><dd>A ParsedKeyVal specification of a MemoryGrp object. The default depends on how MPQC was compiled and the MessageGrp in use.
<p>
<dt><code>THREADGRP</code><dd>A ParsedKeyVal specification of a ThreadGrp object. The default depends on how MPQC was compiled.
<p>

</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>
<p>
<a name="mpqcshmem"><h2>Shared Memory Multiprocessor with SysV IPC</h2></a>

<p>
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>
<p>
<a name="mpqcpthr"><h2>Shared Memory Multiprocessor with POSIX Threads</h2></a>

<p>
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;:(n = 4)"
mpqc input_file
</pre>
<p>
<a name="mpqcmpi"><h2>Shared or Distributed Memory Multiprocessor with MPI</h2></a>

<p>
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>.
<p>
<a name="mpqcmp2"><h2>Special Notes for MP2 Gradients</h2></a>

<p>
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>
<p>
<hr>
<address>
<small>

Generated at Mon Oct 14 14:18:08 2002 for <a
href="http://aros.ca.sandia.gov/~cljanss/mpqc">MPQC</a>
2.1.2 using the documentation package <a
href="http://www.stack.nl/~dimitri/doxygen/index.html">Doxygen</a>
1.2.5.

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