1 |
|
---|
2 | /** \page mpqcrunning Running MPQC
|
---|
3 |
|
---|
4 | This chapter explains how to run MPQC in a variety of environments.
|
---|
5 |
|
---|
6 | The first two sections give general information on running MPQC:
|
---|
7 |
|
---|
8 | <ul>
|
---|
9 | <li> \ref mpqccomline
|
---|
10 | <li> \ref mpqcenv
|
---|
11 | </ul>
|
---|
12 |
|
---|
13 | The final sections given specific information on running MPQC in
|
---|
14 | different environments:
|
---|
15 |
|
---|
16 | <ul>
|
---|
17 | <li> \ref mpqcshmem
|
---|
18 | <li> \ref mpqcpthr
|
---|
19 | <li> \ref mpqcmpi
|
---|
20 | <li> \ref mpqcmp2
|
---|
21 | <li> \ref mpqcmp2r12
|
---|
22 | <li> \ref mpqccca
|
---|
23 | </ul>
|
---|
24 |
|
---|
25 | \section mpqccomline Command Line Options
|
---|
26 |
|
---|
27 | MPQC can be given options followed by an optional input file
|
---|
28 | name. If the input file name is not given, it will default to
|
---|
29 | "mpqc.in". The following command line options are recognized:
|
---|
30 |
|
---|
31 | <dl>
|
---|
32 |
|
---|
33 | <dt><tt>-o</tt><dd>Gives the name of the output file. The default is the
|
---|
34 | console.
|
---|
35 |
|
---|
36 | <dt><tt>-i</tt><dd>Convert a simple input file to an object oriented
|
---|
37 | input file and write the result to the ouput. No
|
---|
38 | calculations are done.
|
---|
39 |
|
---|
40 | <dt><tt>-messagegrp</tt><dd>A ParsedKeyVal specification of a MessageGrp
|
---|
41 | object. The default depends on how MPQC was compiled.
|
---|
42 |
|
---|
43 | <dt><tt>-memorygrp</tt><dd>A ParsedKeyVal specification of a MemoryGrp
|
---|
44 | object. The default depends on how MPQC was compiled.
|
---|
45 |
|
---|
46 | <dt><tt>-threadgrp</tt><dd>A ParsedKeyVal specification of a ThreadGrp
|
---|
47 | object. The default depends on how MPQC was compiled.
|
---|
48 |
|
---|
49 | <dt><tt>-integral</tt><dd>A ParsedKeyVal specification of an Integral
|
---|
50 | object. The default is IntegralV3. Note that some
|
---|
51 | MolecularEnergy specializations require specific choices
|
---|
52 | of Integral specializations and may not work with IntegralV3.
|
---|
53 |
|
---|
54 | <dt><tt>-l</tt><dd>Sets a limit on the number of basis functions. The
|
---|
55 | default is zero, which means an unlimited number of basis
|
---|
56 | functions.
|
---|
57 |
|
---|
58 | <dt><tt>-W</tt><dd>Sets the working directory. The default is the
|
---|
59 | current directory.
|
---|
60 |
|
---|
61 | <dt><tt>-c</tt><dd>Check the input and exit.
|
---|
62 |
|
---|
63 | <dt><tt>-v</tt><dd>Print the version number.
|
---|
64 |
|
---|
65 | <dt><tt>-w</tt><dd>Print the warranty information (there is no warranty).
|
---|
66 |
|
---|
67 | <dt><tt>-d</tt><dd>If a debugger object was given in the input, start the
|
---|
68 | debugger running as soon as MPQC is started.
|
---|
69 |
|
---|
70 | <dt><tt>-h</tt><dd>Print a list of options.
|
---|
71 |
|
---|
72 | <dt><tt>-f</tt><dd>The name of an object-oriented input file. The
|
---|
73 | default is <tt>mpqc.in</tt>. This cannot be used if
|
---|
74 | another input file is specified. This option is
|
---|
75 | deprecated, as both input file formats can be read
|
---|
76 | by given the input file name on the command line
|
---|
77 | without any option flags.
|
---|
78 |
|
---|
79 | <dt><tt>-cca-path</tt><dd>A colon-separated list of directories in which
|
---|
80 | CCA component libraries may be found.
|
---|
81 |
|
---|
82 | <dt><tt>-cca-load</tt><dd>A colon-separated list of sidl class names for
|
---|
83 | CCA components which will be instantiated from the libraries
|
---|
84 | found in the path given by <tt>-cca-path</tt>
|
---|
85 |
|
---|
86 | </dl>
|
---|
87 |
|
---|
88 | Some MPI environments do not pass the command line to slave programs, but
|
---|
89 | supply it when MPI_Init is called. To make MPQC call MPI_Init with the
|
---|
90 | correct arguments as early as possible use the configure option
|
---|
91 | <tt>--enable-always-use-mpi</tt>.
|
---|
92 |
|
---|
93 | \section mpqcenv Environmental Variables
|
---|
94 |
|
---|
95 | MPQC looks at five environmental variables to set up
|
---|
96 | communication, find library files, and specify the default Integral
|
---|
97 | object. Machine specific libraries
|
---|
98 | and utilities to run programs in parallel might look
|
---|
99 | at other environment variables as well. The five that
|
---|
100 | apply on all platforms are:
|
---|
101 |
|
---|
102 | <dl>
|
---|
103 |
|
---|
104 | <dt><tt>SCLIBDIR</tt><dd>The name of the library directory. See the
|
---|
105 | GaussianBasisSet documentation and look below for more
|
---|
106 | information.
|
---|
107 |
|
---|
108 | <dt><tt>MESSAGEGRP</tt><dd>A ParsedKeyVal specification of a MessageGrp
|
---|
109 | object. The default depends on how MPQC was compiled.
|
---|
110 | See the MessageGrp class documentation for more
|
---|
111 | information.
|
---|
112 |
|
---|
113 | <dt><tt>MEMORYGRP</tt><dd>A ParsedKeyVal specification of a MemoryGrp
|
---|
114 | object. The default depends on how MPQC was compiled
|
---|
115 | and the MessageGrp in use.
|
---|
116 |
|
---|
117 | <dt><tt>THREADGRP</tt><dd>A ParsedKeyVal specification of a ThreadGrp
|
---|
118 | object. The default depends on how MPQC was compiled.
|
---|
119 |
|
---|
120 | <dt><tt>INTEGRAL</tt><dd>A ParsedKeyVal specification of an Integral
|
---|
121 | object. The default is IntegralV3. Note that some
|
---|
122 | MolecularEnergy specializations require specific choices
|
---|
123 | of Integral specializations and may not work with IntegralV3.
|
---|
124 |
|
---|
125 | </dl>
|
---|
126 |
|
---|
127 | By default, MPQC tries to find library files first in the <tt>lib</tt>
|
---|
128 | subdirectory of the installation directory and then the source code
|
---|
129 | directory. If the library files cannot be found, MPQC must be notified of
|
---|
130 | the new location with the environmental variable <tt>SCLIBDIR</tt>.
|
---|
131 |
|
---|
132 | For example, if you need to run MPQC on a machine that doesn't have the
|
---|
133 | source code distribution in the same place as it was located on the machine
|
---|
134 | on which MPQC is compiled you must do something like the following on the
|
---|
135 | machine with the source code:
|
---|
136 |
|
---|
137 | <pre>
|
---|
138 | cd mpqc/lib
|
---|
139 | tar cvf ../sclib.tar basis atominfo.kv
|
---|
140 | </pre>
|
---|
141 |
|
---|
142 | Then transfer <tt>sclib.tar</tt> to the machine on which you want to run MPQC
|
---|
143 | and do something like
|
---|
144 |
|
---|
145 | <pre>
|
---|
146 | mkdir ~/sclib
|
---|
147 | cd ~/sclib
|
---|
148 | tar xvf ../sclib.tar
|
---|
149 | setenv SCLIBDIR ~/sclib
|
---|
150 | </pre>
|
---|
151 |
|
---|
152 | The <tt>setenv</tt> command is specific to the C-shell. You will need to
|
---|
153 | do what is appropriate for your shell.
|
---|
154 |
|
---|
155 | The other three keywords specify objects. This is done by giving a mini
|
---|
156 | ParsedKeyVal input in a string. The object is anonymous, that is, no
|
---|
157 | keyword is associated with it. Here is an example:
|
---|
158 |
|
---|
159 | <pre>
|
---|
160 | setenv MESSAGEGRP "<ShmMessageGrp>:(n = 4)"
|
---|
161 | </pre>
|
---|
162 |
|
---|
163 | \section mpqcshmem Shared Memory Multiprocessor with SysV IPC
|
---|
164 |
|
---|
165 | By default, MPQC will run on only one CPU. To specify more, you can give a
|
---|
166 | ShmMessageGrp object on the command line.
|
---|
167 | The following would run MPQC in four processes:
|
---|
168 | <pre>
|
---|
169 | mpqc -messagegrp "<ShmMessageGrp>:(n = 4)" input_file
|
---|
170 | </pre>
|
---|
171 |
|
---|
172 | Alternately, the ShmMessageGrp object can
|
---|
173 | be given as an environmental variable:
|
---|
174 | <pre>
|
---|
175 | setenv MESSAGEGRP "<ShmMessageGrp>:(n = 4)"
|
---|
176 | mpqc input_file
|
---|
177 | </pre>
|
---|
178 |
|
---|
179 | If MPQC should unexpectedly die, shared memory segments and semaphores will
|
---|
180 | be left on the machine. These should be promptly cleaned up or other jobs
|
---|
181 | may be prevented from running successfully. To see if you have any of
|
---|
182 | these resources allocated, use the <tt>ipcs</tt> command. The output will
|
---|
183 | look something like:
|
---|
184 |
|
---|
185 | <pre>
|
---|
186 | IPC status from /dev/kmem as of Wed Mar 13 14:42:18 1996
|
---|
187 | T ID KEY MODE OWNER GROUP
|
---|
188 | Message Queues:
|
---|
189 | Shared Memory:
|
---|
190 | m 288800 0x00000000 --rw------- cljanss user
|
---|
191 | Semaphores:
|
---|
192 | s 390 0x00000000 --ra------- cljanss user
|
---|
193 | s 391 0x00000000 --ra------- cljanss user
|
---|
194 | </pre>
|
---|
195 |
|
---|
196 | To remove the IPC resources used by <tt>cljanss</tt> in
|
---|
197 | the above example on IRIX, type:
|
---|
198 |
|
---|
199 | <pre>
|
---|
200 | ipcrm -m 288800
|
---|
201 | ipcrm -s 390
|
---|
202 | ipcrm -s 391
|
---|
203 | </pre>
|
---|
204 |
|
---|
205 | And on Linux, type:
|
---|
206 |
|
---|
207 | <pre>
|
---|
208 | ipcrm shm 288800
|
---|
209 | ipcrm sem 390
|
---|
210 | ipcrm sem 391
|
---|
211 | </pre>
|
---|
212 |
|
---|
213 | \section mpqcpthr Shared Memory Multiprocessor with POSIX Threads
|
---|
214 |
|
---|
215 | By default, MPQC will run with only one thread. To specify more, you can
|
---|
216 | give a PthreadThreadGrp object on the command line. MPQC is not
|
---|
217 | parallelized to as large an extent with threads as it is with the more
|
---|
218 | conventional distributed memory model, so you might not get the best
|
---|
219 | performance using this technique. On the other the memory overhead is
|
---|
220 | lower and no interprocess communication is needed.
|
---|
221 |
|
---|
222 | The following would run MPQC in four threads:
|
---|
223 |
|
---|
224 | <pre>
|
---|
225 | mpqc -threadgrp "<PthreadThreadGrp>:(num_threads = 4)" input_file
|
---|
226 | </pre>
|
---|
227 |
|
---|
228 | Alternately, the PthreadThreadGrp object can
|
---|
229 | be given as an environmental variable:
|
---|
230 | <pre>
|
---|
231 | setenv THREADGRP "<PthreadThreadGrp>:(num_threads = 4)"
|
---|
232 | mpqc input_file
|
---|
233 | </pre>
|
---|
234 |
|
---|
235 | \section mpqcmpi Shared or Distributed Memory Multiprocessor with MPI
|
---|
236 |
|
---|
237 | A MPIMessageGrp object is used to run using MPI. The number of nodes used
|
---|
238 | is determined by the MPI run-time and is not specified as input data to
|
---|
239 | MPIMessageGrp.
|
---|
240 |
|
---|
241 | <pre>
|
---|
242 | mpqc -messagegrp "<MPIMessageGrp>:()" input_file
|
---|
243 | </pre>
|
---|
244 |
|
---|
245 | Alternately, the MPIMessageGrp object can
|
---|
246 | be given as an environmental variable:
|
---|
247 | <pre>
|
---|
248 | setenv MESSAGEGRP "<MPIMessageGrp>:()"
|
---|
249 | mpqc input_file
|
---|
250 | </pre>
|
---|
251 |
|
---|
252 | Usually, a special command is needed to start MPI jobs; typically it is
|
---|
253 | named <tt>mpirun</tt>.
|
---|
254 |
|
---|
255 | \section mpqcmp2 Special Notes for MP2 Gradients
|
---|
256 |
|
---|
257 | The MP2 gradient algorithm uses MemoryGrp object to access distributed
|
---|
258 | shared memory. The MTMPIMemoryGrp class is the most efficient and reliable
|
---|
259 | implementation of MemoryGrp. It requires a multi-thread aware MPI
|
---|
260 | implementation, which is still not common. To run MP2 gradients on a
|
---|
261 | machine with POSIX threads and an multi-thread aware MPI, use:
|
---|
262 |
|
---|
263 | <pre>
|
---|
264 | mpqc -messagegrp "<MPIMessageGrp>:()" \
|
---|
265 | -threadgrp "<PthreadThreadGrp>:()" \
|
---|
266 | -memorygrp "<MTMPIMemoryGrp>:()" \
|
---|
267 | input_file
|
---|
268 | </pre>
|
---|
269 |
|
---|
270 | or
|
---|
271 |
|
---|
272 | <pre>
|
---|
273 | setenv MESSAGEGRP "<MPIMessageGrp>:()"
|
---|
274 | setenv THREADGRP "<PthreadThreadGrp>:()"
|
---|
275 | setenv MEMORYGRP "<MTMPIMemoryGrp>:()"
|
---|
276 | mpqc input_file
|
---|
277 | </pre>
|
---|
278 |
|
---|
279 | \section mpqcmp2r12 Special Notes for MP2-R12 energies
|
---|
280 |
|
---|
281 | <p>
|
---|
282 | <b>Distributed Memory</b>
|
---|
283 |
|
---|
284 | The MP2-R12 energy algorithm is similar to the MP2 energy algorithm that uses
|
---|
285 | MemoryGrp object to access distributed memory. Hence the MTMPIMemoryGrp is the
|
---|
286 | recommended implementation of MemoryGrp for such computations (see \ref mpqcmp2).
|
---|
287 | </p>
|
---|
288 |
|
---|
289 | <p>
|
---|
290 | <b>Disk I/O</b>
|
---|
291 |
|
---|
292 | In contrast to the MP2 energy and gradient algorithms, the MP2-R12 energy algorithm
|
---|
293 | may have to use disk to store transformed MO integrals if a single pass through
|
---|
294 | the AO integrals is not possible due to insufficient memory. The best option in such case
|
---|
295 | is to increase the total amount of memory available to the computation by either
|
---|
296 | increasing the number of tasks or the amount of memory per task or both.
|
---|
297 |
|
---|
298 | When increasing memory further is not possible, the user has to specify which
|
---|
299 | type of disk I/O should be used for the MP2-R12 energy algorithm. It is done through
|
---|
300 | the <tt>r12ints</tt> keyword in input for the MBPT2_R12 object. The default choice
|
---|
301 | is to use POSIX I/O on the node on which task 0 resides. This kind of disk I/O
|
---|
302 | is guaranteed to work on all parallel machines, provided there's enough disk space
|
---|
303 | on the node. However, this is hardly most efficient on machines with
|
---|
304 | some sort of parallel I/O available.
|
---|
305 | On machines which have an efficient implementation of MPI-IO
|
---|
306 | the <tt>r12ints</tt> should be set instead to <tt>mpi-mem</tt>.
|
---|
307 | This will force the MBPT2_R12
|
---|
308 | object to use MPI-IO for disk I/O. It is user's responsibility to make sure
|
---|
309 | that the MO integrals file resides on an MPI-IO-compatible file system.
|
---|
310 | Hence the <tt>r12ints_file</tt> keyword, which specifies the name of the MO integrals
|
---|
311 | file, should be set to a location which is guaranteed to work properly with MPI-IO.
|
---|
312 | For example, on IBM SP and other IBM machines which have General Parallel File System
|
---|
313 | (GPFS), the user should set <tt>r12ints = mpi-mem</tt> and <tt>r12ints_file</tt>
|
---|
314 | to a file on a GPFS file system.
|
---|
315 | </p>
|
---|
316 |
|
---|
317 | <p>
|
---|
318 | <b>Integral object</b>
|
---|
319 | <br>
|
---|
320 |
|
---|
321 | At the moment, MBPT2_R12 objects require specific specialization of Integral,
|
---|
322 | IntegralCints. Thus in order to compute MP2-R12 energies, your version of MPQC
|
---|
323 | needs to be compiled with support for IntegralCints. A free, open-source
|
---|
324 | library called <tt>libint</tt> is a prerequisite for IntegralCints\if html (see \ref compile)\endif.
|
---|
325 | In order to use IntegralCints as the default Integral object,
|
---|
326 | add <tt>-integral "<IntegralCints>:()"</tt> to the command line,
|
---|
327 | or set environmental variable <tt>INTEGRAL</tt> to <tt>"<IntegralCints>:()"</tt>.
|
---|
328 | </p>
|
---|
329 |
|
---|
330 | \section mpqccca Special Notes for CCA Components
|
---|
331 |
|
---|
332 | <p>
|
---|
333 | <b>Common Component Architecture (CCA)</b>
|
---|
334 |
|
---|
335 | Portions of MPQC functionality are being packaged into CCA components.
|
---|
336 | For general overviews of CCA technology and framework usage, please see
|
---|
337 | <a href="http://www.cca-forum.org">www.cca-forum.org</a> (the tutorial in particular) and the
|
---|
338 | <a href="http://www.cca-forum.org/~cca-chem/doc-apps-0.2/index.html">cca-chem-apps</a>
|
---|
339 | documentation.
|
---|
340 | MPQC components may be utilized directly within the ccaffeine framework, while some
|
---|
341 | components may be instantiated and used within MPQC itself, making use of an embedded
|
---|
342 | CCA framework.
|
---|
343 | </p>
|
---|
344 |
|
---|
345 | <p>
|
---|
346 | <b>CCA Runtime Environment</b>
|
---|
347 |
|
---|
348 | For MPQC runs utilizing embedded components, the runtime environment for the CCA
|
---|
349 | framework must be specified.
|
---|
350 | The colon-separated path used to locate component libraries must be specified either
|
---|
351 | using the <tt>-cca-path</tt> command-line option or using the <tt>cca_path</tt> key
|
---|
352 | within the <tt>mpqc</tt> section of a keyval input.
|
---|
353 | The colon-separated list of component sidl class names which will be referenced within the
|
---|
354 | input must be specified using either the <tt>-cca-load</tt> command-line option or using
|
---|
355 | the <tt>cca_load</tt> key within the <tt>mpqc</tt> section of a keyval input.
|
---|
356 | If defaults for the cca-path and cca-load options are desired, <tt>do_cca</tt> must be
|
---|
357 | set to <tt>yes</tt> in the keyval input.
|
---|
358 |
|
---|
359 | */
|
---|