Sparx is parallelized using MPI on python level and requires python wrapper called MyMPI to run parallel jobs. The following instructions will guide you through the installation of MyMPI. EMAN2 has to be installed before one can proceed.


The installer is meant to work in one of the three possible situations:

* Installation on a customized cluster:

* Installation on a Linux workstation:

* Installation on a Mac workstation:

You have to use 32-bit version of EMAN2 on 32-bit OS and 64-bit version of EMAN2 on 64-bit OS. In other case the following error will appear during MyMPI compilation:

"LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."

Download and install MyMPI

Download MyMPI package prepared for sparx

Use this link pydusa-1.15-sparx-8.tgz to download the file pydusa-1.15-sparx-8.tgz

Unzip the package

Run the following command to unzip the file

tar -xzf pydusa-1.15-sparx-8.tgz

This should create a new folder pydusa-1.15-sparx-8 within the current directory.

Run the installation script

(Note for advanced users: you can omit this step and configure and build MyMPI by yourself - see INSTALL file from pydusa-1.15-sparx-8 directory for further details.)

Enter folder pydusa-1.15-sparx-8 and run script.

cd pydusa-1.15-sparx-8

It will try to configure and compile MyMPI wrapper using your current MPI library. If you do not have MPI installed, it will fail with appriopriate message. In this case one may use parameter "--force" to download and install default MPI environment (but do not do it on a custom cluster - consult the cluster manager instead):

./ --force

It will download and install MPI for you and proceed with MyMPI installation (openmpi-1.6.4 will be installed in EMAN2 directory).


Start sparx and try import mpi. If it runs OK (without any error message) the installation is complete.


After successful installation you can safely remove pydusa-1.15-sparx-8.tgz archive and pydusa-1.15-sparx-8 directory. Please keep in mind that if you reinstall EMAN2 you have to repeat the entire MPI installation procedure. However, one can keep the directory pydusa-1.15-sparx-8 unchanged and after reinstallation of EMAN2 simply run ./ from it.

Known problems

On some linux machines OpenMPI may not work properly with Python wrapper (errors about "undefined symbols" will appear). It may be solved by one of the following:

* Recompile the OpenMPI library with additional option "--disable-dlopen" passed to the configure script (root privileges are needed to do that)

* Set the environment variable LD_PRELOAD=<>

Should everything else fail, please contact: Piotr.Pawliczek(at)

MPI-installation (last edited 2023-07-09 17:24:10 by penczek)