📄 mpqcrun.dox
字号:
/** \page mpqcrun Running MPQCThis chapter explains how to run mpqc in a variety of environments.The first two sections give general information on running MPQC:<ul> <li> \ref mpqccomline <li> \ref mpqcenv</ul>The final sections given specific information on running MPQC indifferent environments:<ul> <li> \ref mpqcshmem <li> \ref mpqcpthr <li> \ref mpqcmpi <li> \ref mpqcmp2</ul>\section mpqccomline Command Line Options MPQC can be given options followed by an optional input filename. If the input file name is not given, it will default to"mpqc.in". The following command line options are recognized:<dl> <dt><tt>-o</tt><dd>Gives the name of the output file. The default is the console. <dt><tt>-i</tt><dd>Convert a simple input file to an object oriented input file and write the result to the ouput. No calculations are done. <dt><tt>-messagegrp</tt><dd>A ParsedKeyVal specification of a MessageGrp object. The default depends on how MPQC was compiled. <dt><tt>-memorygrp</tt><dd>A ParsedKeyVal specification of a MemoryGrp object. The default depends on how MPQC was compiled. <dt><tt>-threadgrp</tt><dd>A ParsedKeyVal specification of a ThreadGrp object. The default depends on how MPQC was compiled. <dt><tt>-integral</tt><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. <dt><tt>-l</tt><dd>Sets a limit on the number of basis functions. The default is zero, which means an unlimited number of basis functions. <dt><tt>-W</tt><dd>Sets the working directory. The default is the current directory. <dt><tt>-c</tt><dd>Check the input and exit. <dt><tt>-v</tt><dd>Print the version number. <dt><tt>-w</tt><dd>Print the warranty information (there is no warranty). <dt><tt>-d</tt><dd>If a debugger object was given in the input, start the debugger running as soon as MPQC is started. <dt><tt>-h</tt><dd>Print a list of options. <dt><tt>-f</tt><dd>The name of an object-oriented input file. The default is <tt>mpqc.in</tt>. 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.</dl>Some MPI environments do not pass the command line to slave programs, butsupply it when MPI_Init is called. To make MPQC call MPI_Init with thecorrect arguments as early as possible use the configure option<tt>--enable-always-use-mpi</tt>.\section mpqcenv Environmental VariablesMPQC looks at five environmental variables to set upcommunication, find library files, and specify the default Integralobject. Machine specific librariesand utilities to run programs in parallel might lookat other environment variables as well. The five thatapply on all platforms are:<dl> <dt><tt>SCLIBDIR</tt><dd>The name of the library directory. See the GaussianBasisSet documentation and look below for more information. <dt><tt>MESSAGEGRP</tt><dd>A ParsedKeyVal specification of a MessageGrp object. The default depends on how MPQC was compiled. See the MessageGrp class documentation for more information. <dt><tt>MEMORYGRP</tt><dd>A ParsedKeyVal specification of a MemoryGrp object. The default depends on how MPQC was compiled and the MessageGrp in use. <dt><tt>THREADGRP</tt><dd>A ParsedKeyVal specification of a ThreadGrp object. The default depends on how MPQC was compiled. <dt><tt>INTEGRAL</tt><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.</dl>By default, MPQC tries to find library files first in the <tt>lib</tt>subdirectory of the installation directory and then the source codedirectory. If the library files cannot be found, MPQC must be notified ofthe new location with the environmental variable <tt>SCLIBDIR</tt>.For example, if you need to run MPQC on a machine that doesn't have thesource code distribution in the same place as it was located on the machineon which MPQC is compiled you must do something like the following on themachine with the source code:<pre>cd mpqc/libtar cvf ../sclib.tar basis atominfo.kv</pre>Then transfer <tt>sclib.tar</tt> to the machine on which you want to run MPQCand do something like<pre>mkdir ~/sclibcd ~/sclibtar xvf ../sclib.tarsetenv SCLIBDIR ~/sclib</pre>The <tt>setenv</tt> command is specific to the C-shell. You will need todo what is appropriate for your shell.The other three keywords specify objects. This is done by giving a miniParsedKeyVal input in a string. The object is anonymous, that is, nokeyword is associated with it. Here is an example:<pre>setenv MESSAGEGRP "<ShmMessageGrp>:(n = 4)"</pre>\section mpqcshmem Shared Memory Multiprocessor with SysV IPCBy default, MPQC will run on only one CPU. To specify more, you can give aShmMessageGrp object on the command line.The following would run mpqc in four processes:<pre>mpqc -messagegrp "<ShmMessageGrp>:(n = 4)" input_file</pre>Alternately, the ShmMessageGrp object canbe given as an environmental variable:<pre>setenv MESSAGEGRP "<ShmMessageGrp>:(n = 4)"mpqc input_file</pre>If MPQC should unexpectedly die, shared memory segments and semaphores willbe left on the machine. These should be promptly cleaned up or other jobsmay be prevented from running successfully. To see if you have any ofthese resources allocated, use the <tt>ipcs</tt> command. The output willlook something like:<pre>IPC status from /dev/kmem as of Wed Mar 13 14:42:18 1996T ID KEY MODE OWNER GROUPMessage Queues:Shared Memory:m 288800 0x00000000 --rw------- cljanss userSemaphores:s 390 0x00000000 --ra------- cljanss users 391 0x00000000 --ra------- cljanss user</pre>To remove the IPC resources used by <tt>cljanss</tt> inthe above example on IRIX, type:<pre>ipcrm -m 288800ipcrm -s 390ipcrm -s 391</pre>And on Linux, type:<pre>ipcrm shm 288800ipcrm sem 390ipcrm sem 391</pre>\section mpqcpthr Shared Memory Multiprocessor with POSIX ThreadsBy default, MPQC will run with only one thread. To specify more, you cangive a PthreadThreadGrp object on the command line. MPQC is notparallelized to as large an extent with threads as it is with the moreconventional distributed memory model, so you might not get the bestperformance using this technique. On the other the memory overhead islower and no interprocess communication is needed.The following would run MPQC in four threads:<pre>mpqc -threadgrp "<PthreadThreadGrp>:(num_threads = 4)" input_file</pre>Alternately, the PthreadThreadGrp object canbe given as an environmental variable:<pre>setenv THREADGRP "<PthreadThreadGrp>:(n = 4)"mpqc input_file</pre>\section mpqcmpi Shared or Distributed Memory Multiprocessor with MPIA MPIMessageGrp object is used to run using MPI. The number of nodes usedis determined by the MPI run-time and is not specified as input data toMPIMessageGrp.<pre>mpqc -messagegrp "<MPIMessageGrp>:()" input_file</pre>Alternately, the MPIMessageGrp object canbe given as an environmental variable:<pre>setenv MESSAGEGRP "<MPIMessageGrp>:()"mpqc input_file</pre>Usually, a special command is needed to start MPI jobs; typically it isnamed <tt>mpirun</tt>.\section mpqcmp2 Special Notes for MP2 GradientsThe MP2 gradient algorithm uses MemoryGrp object to access distributedshared memory. The MTMPIMemoryGrp class is the most efficient and reliableimplementation of MemoryGrp. It requires a multi-thread aware MPIimplementation, which is still not common. To run MP2 gradients on amachine with POSIX threads and an multi-thread aware MPI, use:<pre>mpqc -messagegrp "<MPIMessageGrp>:()" \ -threadgrp "<PthreadThreadGrp>:()" \ -memorygrp "<MTMPIMemoryGrp>:()" \ input_file</pre>or<pre>setenv MESSAGEGRP "<MPIMessageGrp>:()"setenv THREADGRP "<PthreadThreadGrp>:()"setenv MEMORYGRP "<MTMPIMemoryGrp>:()"mpqc input_file</pre>\section mpqcmp2r12 Special Notes for MP2-R12 energies<p><b>Distributed Memory</b>The MP2-R12 energy algorithm is similar to the MP2 energy algorithm that usesMemoryGrp object to access distributed memory. Hence the MTMPIMemoryGrp is therecommended implementation of MemoryGrp for such computations (see \ref mpqcmp2).</p><p><b>Disk I/O</b>In contrast to the MP2 energy and gradient algorithms, the MP2-R12 energy algorithmmay have to use disk to store transformed MO integrals if a single pass throughthe AO integrals is not possible due to insufficient memory. The best option in such caseis to increase the total amount of memory available to the computation by eitherincreasing 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 whichtype of disk I/O should be used for the MP2-R12 energy algorithm. It is done throughthe <tt>r12ints</tt> keyword in input for the MBPT2_R12 object. The default choiceis to use POSIX I/O on the node on which task 0 resides. This kind of disk I/Ois guaranteed to work on all parallel machines, provided there's enough disk spaceon the node. However, this is hardly most efficient on machines withsome sort of parallel I/O available.On machines which have an efficient implementation of MPI-IOthe <tt>r12ints</tt> should be set instead to <tt>mpi-mem</tt>.This will force the MBPT2_R12object to use MPI-IO for disk I/O. It is user's responsibility to make surethat the MO integrals file resides on an MPI-IO-compatible file system.Hence the <tt>r12ints_file</tt> keyword, which specifies the name of the MO integralsfile, 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 <tt>r12ints = mpi-mem</tt> and <tt>r12ints_file</tt>to a file on a GPFS file system.</p><p><b>Integral object</b>At the moment, MBPT2_R12 objects require specific specialization of Integral,IntegralCints. Thus in order to compute MP2-R12 energies, your version of MPQCneeds to be compiled with support for IntegralCints. A free, open-sourcelibrary called <tt>libint</tt> is a prerequisite for IntegralCints (see \ref compile).In order to use IntegralCints as the default Integral object,add <tt>-integral "<IntegralCints>:()"</tt> to the command line,or set environmental variable <tt>INTEGRAL</tt> to <tt>"<IntegralCints>:()"</tt>.</p>*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -