-
Notifications
You must be signed in to change notification settings - Fork 16
Xmipp configuration
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 runas a wrapper (i.e.scipion3 run ./xmipporscipion3 run ./xmipp config)
The Xmipp configuration is to set mainly six compiling blocks: C++, MPI, Java, Cuda (optional but recommended), Matlab (optional), OpenCV (optional, not recommended).
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.
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
includeandlibfrom the current environ (using the python functionsysconfig.get_path('data')) in order to take 'system' headers and libs.In addition, if
hdf5is not found there, Xmipp will look for it in/usr/liband/usr/include/hdf5/serial. If found it, the paths are append to theINCDIRFLAGSandLIBDIRFLAGS. If not and a specific conda environ is present, Xmipp will try to install hdf5 under that conda-environ by using conda.Moreover, if
fftw3ortifflibraries are not found and a specific conda environ is present, Xmipp will try to install them under that conda-environ by using conda.
The default MPI compiler for C is mpicc while mpicxx 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 MPI_CC, MPI_CXX and MPI_LINKERFORPROGRAMS variables.
Additionally, mpirun is the default program to run mpi programs. If not found, mpiexec becomes an option. Then Xmipp will ensure that they are visible prior to assign them to the configuration. You can set any other mpi executor by setting the MPI_RUN variable.
If mpicc, mpicxx or mpirun are not found, Xmipp look for them in the Linux default paths: /usr/lib/openmpi/bin or /usr/lib64/openmpi/bin.
Find below a list of tuneable variables regarding to the MPI 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 MPI_CXX=mpi2-intel) prior to launch the command or, even, you can update the resulting xmipp.conf file once created.
· MPI_RUN: Executor to run MPI programs. mpirun by default.
· MPI_CC: MPI compiler for C code. mpicc by default.
· MPI_CXX: MPI compiler for C++ code. mpicxx by default.
· MPI_CXXFLAGS: Flags to add during the MPI compilation. Empty by default.
· MPI_LINKERFORPROGRAMS: MPI compiler to link C++ libraries. mpicxx by default.
· MPI_LINKFLAGS: Flags to add during the MPI linking. Empty by default.
Xmipp ensures that java command is visible and take its location in order to get the jar and javac compilers. If java is not present in the PATH, Xmipp look for it at /usr/lib/jvm/java-*/bin. If still not found and a specific conda environ is present, **Xmipp will try to install openjdk under that conda-environ by using conda.
Find below a list of tuneable variables regarding to the Java 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 JAVA_HOME=/my/own/java) prior to launch the command or, even, you can update the resulting xmipp.conf file once created.
· JAVA_HOME: Path where java is loacated. dirname $(dirname $(realpath $(which java))) by default (jre is pull out if present).
· JAVA_BINDIR: Path where jar and javac are located. %(JAVA_HOME)s/bin by default.
· JAVAC: JavaC compiler. %(JAVA_BIN)s/javac by default.
· JAR: Jar compiler. %(JAVA_BIN)s/jar by default.
· JNI_CPPPATH: Include paths during the Java compilation. %(JAVA_HOME)s/include:%(JAVA_HOME)s/include/linux by default.
Cuda compilation is optional in Xmipp, but strongly recommended. Xmipp will find the nvcc compiler in the PATH and will take its corresponding cuda toolkit. If no nvcc is found in the PATH, Xmipp look for it in the default Linux locations: /usr/local/cuda*/bin. In addition, you can add a target path by export CUDA_BIN=/my/own/cuda/bin or even export XMIPP_CUDA_BIN=/my/own/cuda/bin.
· CUDA:
· NVCC:
· CXX_CUDA:
· NVCC_CXXFLAGS:
· NVCC_LINKFLAGS:
· MATLAB:
· MATLAB_DIR:
· OPENCV:
· OPENCVSUPPORTSCUDA:
· OPENCV3:
,, '',,'DEBUG','','','','', 'USE_DL', 'VERIFIED', 'CONFIG_VERSION',
Developed by xmipp team