IMP logo
IMP Reference Guide  2.5.0
The Integrative Modeling Platform
IMP::mpi Namespace Reference

Code that uses the MPI parallel library. More...

Detailed Description

Code that uses the MPI parallel library.

To enable this module, you must build IMP with your MPI library's MPI compiler rather than the default C++ compiler (e.g. mpic++ rather than g++). To do this, first set up your MPI library so that mpic++ is in your PATH (on some systems by using something like module load mpi/openmpi-x86_64) and then run cmake with the -DCMAKE_CXX_COMPILER=mpic++ option.

If you want to use OpenMPI, note that the default build on many Linux systems doesn't play nicely with Python (you may see errors like mca: base: component_find: unable to open /usr/lib64/openmpi/lib/openmpi/mca_shmem_sysv: perhaps a missing symbol, or compiled for a different version of Open MPI?). This can be fixed either by recompiling OpenMPI with the --disable-dlopen configure flag, or by running import DLFCN as dl; sys.setdlopenflags(dl.RTLD_NOW|dl.RTLD_GLOBAL) in your Python script before importing IMP.mpi. We also recommend that you use version 1.7 of OpenMPI or older, as the 1.8 release does not appear to work with the mpi4py package that some parts of IMP::pmi use.

Info

Author(s): Max Bonomi

Maintainer: benmwebb

License: LGPL

Publications:

Classes

class  ReplicaExchange
 A class to implement Hamiltonian Replica Exchange. More...
 

Standard module functions

All IMP modules have a set of standard functions to help get information about the module and about files associated with the module.

std::string get_module_version ()
 
std::string get_module_name ()
 
std::string get_data_path (std::string file_name)
 Return the full path to one of this module's data files. More...
 
std::string get_example_path (std::string file_name)
 Return the full path to one of this module's example files. More...
 

Function Documentation

std::string IMP::mpi::get_data_path ( std::string  file_name)

Return the full path to one of this module's data files.

To read the data file "data_library" that was placed in the data directory of this module, do something like

std::ifstream in(IMP::mpi::get_data_path("data_library"));

This will ensure that the code works both when IMP is installed or if used via the setup_environment.sh script.

Note
Each module has its own data directory, so be sure to use this function from the correct module.
std::string IMP::mpi::get_example_path ( std::string  file_name)

Return the full path to one of this module's example files.

To read the example file "example_protein.pdb" that was placed in the examples directory of this module, do something like

std::ifstream in(IMP::mpi::get_example_path("example_protein.pdb"));

This will ensure that the code works both when IMP is installed or if used via the setup_environment.sh script.

Note
Each module has its own example directory, so be sure to use this function from the correct module.