Skip to content

Xmipp configuration

David Maluenda Niubó edited this page Aug 13, 2020 · 8 revisions

The main command ./xmipp will try to make the properly configuration according to your system generating a config file named xmipp.conf. Afterwards, XMIPP well be built. You can run ./xmipp config to only set the configuration.

If your Xmipp is intended to run under Scipion, you should run scipion3 run as a wrapper (i.e. scipion3 run ./xmipp or scipion3 run ./xmipp config)

The Xmipp configuration is to set mainly five items: C++ compiler, MPI, Java, Cuda (optional but recommended), Matlab (optional).

The idea is always the same, Xmipp will try to find compilers in the PATH (similar to the which command) and from them taking their libraries and headers. If some compiler is not found in the PATH, Xmipp will look for the default installing paths on the majority of the Linux distros. You can bypass this automatic searching by means of manually setting the environment variables described in the sections below.

If your Xmipp is intended to run under Scipion, you can add that environment variables in the scipion3/config/scipion.conf.

C++ configuration

The default C compiler is gcc while g++ compiler is for C++ code and C++ library links. Then Xmipp will ensure that they are visible prior to assign them to the configuration. You can set any other compilers by setting the CC, CXX and LINKERFORPROGRAMS variables.

Find below a list of tuneable variables regarding to the C and C++ compilation. Keep in mind that they are automatically set by ./xmipp config. However, you can bypass this automatic setting by exporting them (e.g. export CXX=icc) prior to launch the command or, even, you can update the resulting xmipp.conf file once created.

· CC: C compiler. gcc by default.
· CCFLAGS: Flags to add during the C compilations. -std=c99 by default

· CXX: C++ compiler. g++ by default.
· CXXFLAGS: Flags to add during the C++ compilations. -mtune=native -march=native -std=c++11 -O3 by default.
· INCDIRFLAGS: Flags to add headers directories. See note below.
· LIBDIRFLAGS: Flags to add libraries directories. See note below.

· LINKERFORPROGRAMS: C++ linker. g++ by default.
· LINKFLAGS: Flags to add while linking. Empty by default.

· PYTHON_LIB: Python library to make the python binding. Xmipp automatically discovers the current python (e.g. python3.5m).
· PYTHONINCFLAGS: Flags to add during the binding compilation. Usually to include the python header and the numpy header (e.g. -I/usr/include/python3.5m -I/home/david/scipion3/.scipion3env/lib/python3.5/site-packages/numpy/core/include)

INCDIRFLAGS and LIBDIRFLAGS

Xmipp adds the include and lib from the current environ (using the python function sysconfig.get_path('data')) in order to take 'system' headers and libs.

In addition, if hdf5 is not found there, Xmipp will look for it in /usr/lib and /usr/include/hdf5/serial. If found it, the paths are append to the INCDIRFLAGS and LIBDIRFLAGS. If not and a specific conda environ is present, Xmipp will try to install hdf5 under that conda-environ by using conda.

Moreover, if fftw3 or tiff libraries are not found and a specific conda environ is present, Xmipp will try to install them under that conda-environ by using conda.

MPI configuration

Java configuration

Cuda configuration

Matlab configuration

,'MPI_CC','MPI_CXX','MPI_RUN','MPI_LINKERFORPROGRAMS','MPI_CXXFLAGS', 'MPI_LINKFLAGS','NVCC','CXX_CUDA','NVCC_CXXFLAGS','NVCC_LINKFLAGS', 'MATLAB_DIR','CUDA','DEBUG','MATLAB','OPENCV','OPENCVSUPPORTSCUDA','OPENCV3', 'JAVA_HOME','JAVA_BINDIR','JAVAC','JAR','JNI_CPPPATH', 'USE_DL', 'VERIFIED', 'CONFIG_VERSION', 'PYTHON_LIB'

Clone this wiki locally