potfit does support all common MPI implementations for parallel execution. While the build process for an MPI-enabled build is almost the same as a regular build, there are some minor differences you should be aware of.
In order to enable MPI support in potfit the
–enable-mpi command line option needs to be specified. It will always be assumed that there is an
mpicc command which knows how to handle the current environment properly.
–enable-mpi you cannot specify a compiler with the
A command to compile potfit with MPI support might look like this:
./waf configure -i pair -m apot --enable-mpi
Usually you should see output similar to this:
Checking for 'icc' (C compiler) : not found Checking for 'clang' (C compiler) : not found Checking for 'gcc' (C compiler) : mpicc
All enabled options will also be listed on the summary of the configuration stage:
potfit has been configured with the following options: potential model = apot interaction = pair math library = mkl options = mpi
The selection of the MPI compiler depends on your MPI implementation. For Open MPI this behavior is controlled through environment variables, like
To switch the compiler you can use this command (OpenMPI):
OMPI_CC="clang" ./waf configure -i pair -m apot --enable-mpi
Checking the output, you should see that the
mpicc command has now been identified as a clang compiler:
Checking for 'icc' (C compiler) : not found Checking for 'clang' (C compiler) : mpicc
To make sure the same value of the environment variables are used for all steps of the potfit compilation process please export the variable using you shell.