Running LocScale with MPI requires OpenMPI and setting up mpi4py within the EMAN2 Python framework. Please check with your system administration on any existing setup.
EMAN2 installed via miniconda
The setup is very simple in EMAN2 installed via miniconda. mpi4py is not installed by default in miniconda, so we need to fetch it:
conda install mpi4py
The MPI framework after EMAN2 install can be found /Users/user/miniconda/mpirun
.
Other EMAN2 installations
(1) Install OpenMPI
sudo apt-get install openmpi
(2) Install and set up mpi4py
$EMAN2DIR is the location of the EMAN2’s python before lib/python2.7/site-packages
cd $EMAN2DIR
wget https://bitbucket.org/mpi4py/mpi4py/downloads/mpi4py-2.0.0.tar.gz
tar -zxf $PWD/mpi4py-2.0.0.tar.gz
cd mpi4py-2.0.0
cat > mpi.cfg << EOF
[openmpi]
mpi_dir = PATH_TO_YOUR_OPENMPI
mpicc = %(mpi_dir)s/bin/mpicc
mpicxx = %(mpi_dir)s/bin/mpicxx
library_dirs = %(mpi_dir)s/include/openmpi
runtime_library_dirs = %(library_dirs)s
EOF
# assuming EMAN2 is the default Python framework
python setup.py build --mpi=openmpi
python setup.py install --prefix=$EMAN2DIR
python -c 'import mpi4py’