SPHIRE on CentOS 7

SPHIRE (SParks for High Resolution Electron microscopy) is a new software suite designed for easy access to cryo electron microscopy (yes, I quoted). I was asked to make it available on our systems, so here is the tale of my experience.

In principle I just need to download it and follow the installation instructions, but I can’t do that, since I have a lot of software already installed, to start with, another version of EMAN2, and another version of openmpi. I download, then, the main package


untar it, load my mpi module, and try to install it by typing


Of course, it works. Happily, I make a module for it, and test that we can get the GUI after typing sphire. Everything looks fine so far. Unfortunately, when you try to do something for real, like using the 20 cores of the machine, openmpi doesn’t seem to be available. Error reads:

mpirun -np 10 sxali2d.py start.hdf ali2d --MPI
Traceback (most recent call last):
  File "/usr/local/EMAN2_sphire/bin/sxali2d.py", 
line 142, in 
  File "/usr/local/EMAN2_sphire/bin/sxali2d.py", line 95, in main
    from mpi import mpi_init, mpi_comm_size, 
mpi_comm_rank, MPI_COMM_WORLD
ImportError: No module named mpi

If you try to load my openmpi module in addition to sphire, what you get is opempi and sphire, but sphire doesn’t seem to run with it. Could it be that pydusa is missing? Let’s add it to the sphire folder, and untar it, as suggested.

I start from scratch, and I do step 1 (eman2-installer) step2 (source the eman2 enviroment) step 3 (load my openmpi) and step4 (install the custom pydusa)

tar xvf pydusa-1.15es-fftmpi-6__2016_09_07.tgz

But the error persist. Therefore it must be openmpi. I’m reluctant to install another opempi that will come stucked with pydusa, but it looks like there is no other solution. Now I remember what I always read about missing programmers on the Academia. Since there is a pydusa option that will pull in the right mpi version, and since I already lost a day with this, I use the option

./install_mpi.py --force

an see how openmpi-1.10.2.tar.gz is installed as a part of the pydusa installation. The installation takes some time (~ 20 minutes).  A lot of messages are printed out, but they don’t look scary. The last lines read:

=====> Install the mpi python binding
 make install >> log.txt
=====> To complete installation you need to run:
source /usr/local/EMAN2_sphire2/eman2.bashrc

Then start SPARX or EMAN2 and run 'import mpi'. 
If it runs without any error message the installation is complete.

I do as suggested. The printout reads:

 ## > source /usr/local/EMAN2_sphire2/eman2.bashrc
 ## > sx.py
WARNING: IPython History requires SQLite, 
your history will not be saved
Python 2.7.3 (default, Jul 30 2013, 15:07:49) 
Type "copyright", "credits" or "license" for more information.

IPython 1.2.1 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object', use 'object??' for extra details.
Welcome to the interactive SPARX-GUI Python interface, 
provided by ipythonSPARX v4.0 (GITHUB: Sat Nov 26 12:37:45 2016)

In [1]: import mpi

In [2]: quit

And the “real test” seems to work also! As an user, I source the suggested bashrc, the GUI opens, and I can run over several processors. I was, once more, too naive to think a program suite was designed to run under all the circumstances. Let’s not think I’m the culprit but the non-professional approach. Anyway, you don’t need to be professional to release a program, and even professional programs and equipment fail. Look at the new MacBook pro or the (in)famous Samsung Galaxy 7, for example.

One of these days, I’ll write again something interesting. I promise.


About bitsanddragons

A traveller, an IT professional and a casual writer
This entry was posted in bits, centos, linux, software, sphire. Bookmark the permalink.

2 Responses to SPHIRE on CentOS 7

  1. Pingback: SPHIRE update on CentOS 7 | Bits and Dragons

  2. Pingback: SPHIRE reinstall on CentOS 7 | Bits and Dragons

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s