potfit wiki

open source force-matching

User Tools

Site Tools


This is an old revision of the document!

Compiling potfit with MPI parallelization

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.

When using –enable-mpi you cannot specify a compiler with the –check-c-compiler flag!

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

Selecting the MPI compiler

The selection of the MPI compiler depends on your MPI implementation. For Open MPI this behavior is controlled through environment variables, like OMPI_CC, OMPI_CFLAGS and OMPI_LDFLAGS.

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
compiling/mpi.1589465753.txt.gz · Last modified: 2020/05/14 16:15 by daniel