mpqcrun3
Running mpqc this chapter explains how to run mpqc in a variety of environments. the first two sections give general information on running mpqc: the final sections given specific information on running mpqc in different environments:
Options
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:
-
-o -
Gives the name of the output file. The default is the console.
-
-i -
Convert a simple input file to an object oriented input file and write the result to the ouput. No calculations are done.
-
-messagegrp -
A ParsedKeyVal specification of a MessageGrp object. The default depends on how MPQC was compiled.
-
-memorygrp -
A ParsedKeyVal specification of a MemoryGrp object. The default depends on how MPQC was compiled.
-
-threadgrp -
A ParsedKeyVal specification of a ThreadGrp object. The default depends on how MPQC was compiled.
-
-integral -
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.
-
-l -
Sets a limit on the number of basis functions. The default is zero, which means an unlimited number of basis functions.
-
-W -
Sets the working directory. The default is the current directory.
-
-c -
Check the input and exit.
-
-v -
Print the version number.
-
-w -
Print the warranty information (there is no warranty).
-
-d -
If a debugger object was given in the input, start the debugger running as soon as MPQC is started.
-
-h -
Print a list of options.
-
-f -
The name of an object-oriented input file. The default is
mpqc.in. 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.
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 --enable-always-use-mpi.
Environmental Variables
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:
SCLIBDIR-
The name of the library directory. See the GaussianBasisSet documentation and look below for more information.
MESSAGEGRP-
A ParsedKeyVal specification of a MessageGrp object. The default depends on how MPQC was compiled. See the MessageGrp class documentation for more information.
MEMORYGRP-
A ParsedKeyVal specification of a MemoryGrp object. The default depends on how MPQC was compiled and the MessageGrp in use.
THREADGRP-
A ParsedKeyVal specification of a ThreadGrp object. The default depends on how MPQC was compiled.
INTEGRAL-
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.
By default, MPQC tries to find library files first in the lib 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 SCLIBDIR.
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:
cd mpqc/lib tar cvf ../sclib.tar basis atominfo.kv
Then transfer sclib.tar to the machine on which you want to run MPQC and do something like
mkdir ~/sclib cd ~/sclib tar xvf ../sclib.tar setenv SCLIBDIR ~/sclib
The setenv command is specific to the C-shell. You will need to do what is appropriate for your shell.
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:
setenv MESSAGEGRP '<ShmMessageGrp>:(n = 4)'
Special Notes for MP2 Gradients
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:
mpqc -messagegrp '<MPIMessageGrp>:()' \
-threadgrp '<PthreadThreadGrp>:()' \
-memorygrp '<MTMPIMemoryGrp>:()' \
input_file
or
setenv MESSAGEGRP '<MPIMessageGrp>:()' setenv THREADGRP '<PthreadThreadGrp>:()' setenv MEMORYGRP '<MTMPIMemoryGrp>:()' mpqc input_file
Special Notes for MP2-R12 energies
Distributed Memory
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 Special Notes for MP2 Gradients).
Disk I/O
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.
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 r12ints 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 r12ints should be set instead to mpi-mem. 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 r12ints_file 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 r12ints = mpi-mem and r12ints_file to a file on a GPFS file system.
Integral object
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 libint is a prerequisite for IntegralCints (see Compiling). In order to use IntegralCints as the default Integral object, add -integral '<IntegralCints>:()' to the command line, or set environmental variable INTEGRAL to '<IntegralCints>:()'.