-
Notifications
You must be signed in to change notification settings - Fork 2
future reference
First, enter the wise login node via
ssh wise
and change to gcc 4.9.2 via
source /opt/rh/devtoolset-3/enable
Both steps are required since comic threw an error message I couldn't get rid of during compilation saying "cc1plus: out of memory allocating 4064 bytes after a total of 145620992 bytes". Changing to wise doubled the memory (you can check via the command free) and using gcc 4.9.2 has worked too. (However, I didn't try compiling at wise without changing to gcc 4.9.2. So, this step might not be required).
For the compilation on the cluster I used cmake 3.6.2 with the following command
/share/apps/cmake-3.6.2/bin/cmake \ -D CMAKE_BUILD_TYPE=Release \ -D BUILD_TESTING=OFF \ -D BUILD_EXAMPLES=OFF \ -D BUILD_SHARED_LIBS=ON \ -D ITK_WRAP_PYTHON=ON \ -D ITK_LEGACY_SILENT=ON \ -D ITK_WRAP_float=ON \ -D ITK_WRAP_double=ON \ -D ITK_WRAP_signed_char=ON \ -D ITK_WRAP_signed_long=ON \ -D ITK_WRAP_signed_short=ON \ -D ITK_WRAP_unsigned_char=ON \ -D ITK_WRAP_unsigned_long=ON \ -D ITK_WRAP_unsigned_short=ON \ -D ITK_WRAP_vector_float=ON \ -D ITK_WRAP_vector_double=ON \ -D ITK_WRAP_covariant_vector_double=ON \ -D Module_ITKReview=ON \ -D Module_SmoothingRecursiveYvvGaussianFilter=ON \ -D Module_BridgeNumPy=ON \ -D NUMPY_INCLUDE_DIR=/home/mebner/extern/lib/python2.7/site-packages/numpy/core/include \ -D PYTHON_EXECUTABLE=/home/mebner/extern/bin/python2.7 \ -D PYTHON_INCLUDE_DIR=/home/mebner/extern/include/python2.7 \ -D PYTHON_LIBRARY=/home/mebner/extern/lib/libpython2.7.so \ -D PY_SITE_PACKAGES_PATH=/home/mebner/extern/lib/python2.7/site-packages \ ../ITK_NiftyMIC/
whereby python-2.7.12 was installed on the cluster as described below in section "Python on cluster". Then, run with a maximum of 4 threads on the login node (to use less memory) via
make -j4
It might be that the error "cc1plus: out of memory" still occurs but rerunning again with make -j4 worked out for me. So, maybe trying make -j2 in the first place (and bearing with slower compilation) will solve it entirely?
To install Python on the cluster the instructions on LinuxFromScratch are followed but with --prefix=/home/mebner/extern.
In .bashrc add the following lines
export PATH="/home/mebner/extern/bin:$PATH" export LD_LIBRARY_PATH="/home/mebner/extern/lib:${LD_LIBRARY_PATH}" export CPATH="/home/mebner/extern/include:${CPATH}" export PYTHONPATH=/home/mebner/extern/lib/python2.7/site-packages:$PYTHONPATH
Once this is done, set up a virtual environment with
virtualenv -p /share/apps/python-2.7.11-shared/bin/python2.7 /home/mebner/development/Python_virtualenv
and add the lines
source /opt/rh/devtoolset-3/enable export PATH="/home/mebner/development/NiftyReg/NiftyReg-build/install/bin:$PATH" export LD_LIBRARY_PATH="/home/mebner/development/NiftyReg/NiftyReg-build/install/lib:${LD_LIBRARY_PATH}" export LD_LIBRARY_PATH="/home/mebner/extern/lib:${LD_LIBRARY_PATH}" export CPATH="/home/mebner/extern/include:${CPATH}" NIFTYMIC_ITK_DIR="/home/mebner/development/ITK/ITK-build_dev" NIFTYMIC_Boost_NO_BOOST_CMAKE="ON"
at the end of /home/mebner/development/Python_virtualenv/bin/activate