Gadgetron Installation Sample

Gadgetron

Find the SPEC and SOURCES directory at /usr/local/doc/GADGETRON/ in hpctest and follow the instructions at HPC RPM Installation Guide.

In the spec file, I have used gcc-4.8.5 while compiling as required by older version of gadgetron; you may want to try the following:

%define gcc_full_path '/home/sxg125/.usr/local/src/gadgetron/4.8.5/bin'

You may want to try gcc-4.9.3.

Note: CMAKE Flags, Package_ROOT, Package_HOME and others did not work as expected. So, they have been applied in cmake as showed:

cmake -DCMAKE_INSTALL_PREFIX=%{_prefix}/%{lname}/%{version} -DPYTHON_LIBRARIES=/usr/local/python/2.7.10/lib/libpython2.7.so -DPYTHON_LIBRARY=/usr/local/python/2.7.10/lib/libpython2.7.so -DPYTHON_INCLUDE_DIRS=/usr/local/python/2.7.10/include/python2.7 -DPYTHON_INCLUDE_DIR=/usr/local/python/2.7.10/include/python2.7 -DPYTHON_EXECUTABLE=/usr/local/python/2.7.10/bin -DNUMPY_INCLUDE_DIRS=/usr/local/python/2.7.10/lib/python2.7/site-packages/numpy/core/include -DMATLAB_ROOT=%{matlab_root} -DFFTW3F_LIBRARY=%{fftw3_root_dir}/lib/libfftw3f.a -DFFTW3_LIBRARY=%{fftw3_root_dir}/lib/libfftw3.a -DFFTW3_INCLUDE_DIR=%{fftw3_root_dir}/include -DISMRMRD_INCLUDE_DIR=%{ismrmrd_home}/include -DISMRMRD_LIBRARIES=%{ismrmrd_home}/lib/libismrmrd.so -DISMRMRD_LIBRARY=%{ismrmrd_home}/lib/libismrmrd.so -DISMRMRD_SCHEMA_DIR=%{ismrmrd_home}/schema  -DCMAKE_CXX_COMPILER=/home/sxg125/.usr/local/src/gadgetron/4.8.5/bin/g++ -DCMAKE_C_COMPILER=/home/sxg125/.usr/local/src/gadgetron/4.8.5/bin/gcc -DACE_INCLUDE_DIR=%{ace_root}/include -DACE_LIBRARY=%{ace_root}/lib/libACE.so -DBoost_INCLUDE_DIR=%{boost_root}/include -DHDF5_DIR=%{hdf5_root} -DHDF5_INCLUDE_DIRS=%{hdf5_root}/include -DHDF5_C_INCLUDE_DIR=%{hdf5_root}/include -DHDF5_CXX_INCLUDE_DIR=%{hdf5_root}/include -DHDF5_LIBRARIES='-L%{hdf5_root}/lib -lhdf5' -DARMADILLO_INCLUDE_DIRS=%{armadillo_home_path}/include -DARMADILLO_INCLUDE_DIR=%{armadillo_home_path}/include -DARMADILLO_LIBRARY=%{armadillo_home_path}/lib/libarmadillo.so

--------------------------------------

Note: Install using GPU node

srun -p gpufermi --gres=gpu:1 --pty bash

After installation, the binaries and libraries should be located at bin and lib directory at $HOME/.usr/local/gadgetron/3.8.2

Description of the Changes in the Original Source Files:

1. MKL path is hardcoded at gadgetron-3.8.2/cmake/FindMKL.cmake

#else ( WIN32 )

   set(MKLROOT_PATH "/usr/local/intel/2015/composer_xe_2015.3.187" CACHE PATH "Where the MKL are stored")

#endif ( WIN32 )

2. Made sure that numpy and h5py modules were present in the python module.

>>>help("modules")

3. Over-ridden the FindNumPy.cmake file at gadgetron-3.8.2/cmake/

set(NUMPY_VERSION "1.11.0.dev0+e6dbce")

set(NUMPY_FOUND TRUE)

message("NumPy:${NUMPY_INCLUDE_DIRS} ${NUMPY_VERSION}")

The values for NUMPY_VERSION and NUMPY_INCLUDE_DIRS  were generated through:

>>> import numpy as n

>>> print(n.__version__)

1.11.0.dev0+e6dbcea

>>> print(n.get_include())

/usr/local/python/2.7.10/lib/python2.7/site-packages/numpy/core/include

4. Could not recognize HDF5 without including HDF5 path through export (before camke)

export PATH=/usr/local/hdf5/hdf5.8.15:$PATH

5. Install converter - siemens_to_ismrmrd/2015 - https://github.com/ismrmrd/siemens_to_ismrmrd

Already installed in HPC

module load siemens_to_ismrmrd

Gadgetron Module:

Dependency modules to be included in gadgetron module at $HOME/.usr/local/share/modulefiles/gadgetron/3.8.2 from the module list in spec file

module load ace

module load python

module load fftw/3.3.4

module load ismrmrd/2015

module load intel/2015

module load armadillo/5.600.2

module load hdf5/1.8.15

module load boost/1_58_0

module load matlab/R2014b

module load cuda/7.0.28

module load gcc/4.9.3

module load siemens_to_ismrmrd/2015