|
Running MPQCThis 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:
Command Line OptionsMPQC 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:
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. 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:
By default, MPQC tries to find library files first in the 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
mkdir ~/sclib cd ~/sclib tar xvf ../sclib.tar setenv SCLIBDIR ~/sclib
The 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)"
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: mpqc -messagegrp "<ShmMessageGrp>:(n = 4)" input_file Alternately, the ShmMessageGrp object can be given as an environmental variable: setenv MESSAGEGRP "<ShmMessageGrp>:(n = 4)" mpqc input_file
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
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
To remove the IPC resources used by
ipcrm -m 288800 ipcrm -s 390 ipcrm -s 391 And on Linux, type:
ipcrm shm 288800 ipcrm sem 390 ipcrm sem 391
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. The following would run MPQC in four threads:
mpqc -threadgrp "<PthreadThreadGrp>:(num_threads = 4)" input_file Alternately, the PthreadThreadGrp object can be given as an environmental variable: setenv THREADGRP "<PthreadThreadGrp>:(n = 4)" mpqc input_file
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.
mpqc -messagegrp "<MPIMessageGrp>:()" input_file Alternately, the MPIMessageGrp object can be given as an environmental variable: setenv MESSAGEGRP "<MPIMessageGrp>:()" mpqc input_file
Usually, a special command is needed to start MPI jobs; typically it is named
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
Generated at Fri Jan 10 08:14:10 2003 for MPQC 2.1.3 using the documentation package Doxygen 1.2.14. |