-
Notifications
You must be signed in to change notification settings - Fork 15
Installing Xmipp on CentOS 7
General dependencies
sudo yum install scons fftw-dev openmpi-devel libtiff-devel sqlite3-devel default-jdk git cmake python3 python3-devel python3-numpy python3-tkinter wget libjpeg-devel java-1.8.0-openjdk-devel libsq3-devel libzstd
Compiler
The version of gcc and g++ included in the latest version of CentOS 7 is too old (4.8) and it is not supported by Xmipp. Also, the latest version of gcc-8 and g++-8 obtainable from the devtoolset-8 package is too old (8.3), so we suggest installing the compilers from version 9 onwards (the example in this guide installs gcc-10 and g++-10).
In CentOS, you can install a devtoolset to incorporate a newer version of the compilers. To do this, you must first enable the RedHat CentOS SCL repository. Please ask your system administrator to do this for you if you have no permission or have any kind of doubt. The following commands will install the devtoolset and use it by default for all users:
# Enable the repository and install the binaries
yum install centos-release-scl
yum install devtoolset-10-gcc devtoolset-10-gcc-c++
# Add the newly installed binaries as options for gcc and g++
sudo update-alternatives --install /usr/bin/gcc gcc /opt/rh/devtoolset-10/usr/bin/gcc 10
sudo update-alternatives --install /usr/bin/g++ g++ /opt/rh/devtoolset-10/usr/bin/g++ 10
# Select them as the default option - this will show an interactive menu: choose the installed version and hit enter
sudo update-alternatives --config gcc
sudo update-alternatives --config g++
The packages devtoolset-10-gcc and devtoolset-10-g++ can be found in /opt/rh/devtoolset-10/root/usr/bin/gcc
and /opt/rh/devtoolset-10/root/usr/bin/g++
. To temporarily enable them in a console you can execute scl enable devtoolset-10 -- bash
(bear in mind it will be disabled on console closing). You can check if you are using the correct version of the compilers with mpicc --version
, gcc --version
and g++ --version
.
Errors with hdf5
We recommend removing all hdf5 versions and install just hdf5-devel. To do that:
sudo yum remove hdf5
sudo yum remove hdf5-devel
pip uninstall h5py
remove all files related to hdf5 in:
_/usr/lib64/libhdf5*_
_/usr/include/hdf5*_
_/usr/lib/x86_64-linux-gnu/hdf5_*
_.../anaconda3/include/H5*.h_
_.../anaconda3/include/hdf5*.h_
_.../anaconda3/lib/libhdf5*_
_.../anaconda3/envs/.../libhdf5*_
be sure about the gcc version (gcc --version) install hdf5-devel
sudo yum install hdf5-devel
CUDA Follow official install instructions Take care on the version of GCC/G++ installed. This StackOverflow post contains the compatibility chart of CUDA + GCC/G++. You can have different versions working at the same time but it can be complex for basic linux users.
OpenCV
sudo yum install opencv-devel
git clone https://github.com/I2PC/xmipp.git && cd xmipp && ./xmipp
Developed by xmipp team