9 Running Mrcc

Please be sure that the directory where the Mrcc executables are located are included in your PATH environmental variable. Note that the package includes several executables, and all of them must be copied to the aforementioned directory, not only the driver program dmrcc. Please also check your LD_LIBRARY_PATH environmental variable, which must include the directories containing the libraries linked with the program. This variable is usually set before the installation, but you should not change by removing the names of the corresponding directories. Please do not forget to copy the input file MINP (see Sect. 11) to the directory where the program is invoked.

9.1 Running Mrcc in serial mode

To run Mrcc in serial the user must invoke the driver of the package by simply typing
dmrcc
on a Unix console. To redirect the input one should execute dmrcc as
dmrcc >> out
where out is the output file.

9.2 Running Mrcc in parallel using OpenMP

Several executables of the package can be run in OpenMP parallel mode, hence it is recommended to use this option on multiprocessor machines.

The pre-built binaries available at the Mrcc homepage support OpenMP-parallel execution. If you prefer source-code installation, to compile the program for OpenMP parallel execution you need to invoke the build.mrcc script with the -pOMP option at compilation (see Sect. 7). The OpenMP parallelization has been tested with PGF, Intel, GNU, and HP compilers. Please be careful with other compilers, run, e.g., our test suite (see Sect. 8) with the OpenMP-complied executables before production calculations.

To run the code with OpenMP you only need to set the environmental variable OMP_NUM_THREADS to the number of cores you want to use. E.g., under Bourne shell (bash):
export OMP_NUM_THREADS=4
Then the program should be executed as described above.

9.3 Running Mrcc in parallel using MPI

Currently only executable mrcc can be run in parallel using MPI technology. To compile the program for MPI parallel execution you need to invoke the build.mrcc script with the -pMPI option at compilations (see Sect. 7). It has been tested with the PGF, Intel, GNU, and Solaris compilers as well as the Open MPI and local area multicomputer MPI (LAM/MPI) environments.

To execute mrcc using MPI you should follow the following steps. Prepare input files as usual. Execute dmrcc. The program will stop after some time with the message “Now launch mrcc in parallel mode!”. Then copy files fort.1* and fort.5* to the compute nodes, and execute mrcc using mpirun. E.g. (with Open MPI):
for i in `cat myhosts`
do
scp fort.1* fort.5* $i:/scr/$USER/
done
mpirun --nolocal --hostfile myhosts -wdir /scr/$USER/ -np 10 mrcc

In the above script it is supposed that the user has a file named myhosts with the names of the compute nodes, and that the user has a temporary directory, /scr/$USER/, on each node. The script will execute mrcc on 10 nodes specified in myhosts, no program is executed on the submit node.