xpsi-group / xpsi

X-PSI: X-ray Pulse Simulation and Inference
Other
34 stars 21 forks source link

Update X-PSI installation instructions for Helios #383

Open thjsal opened 4 months ago

thjsal commented 4 months ago

X-PSI installation instructions for Helios cluster should be updated, since the system has been upgraded and the old modules cannot be used anymore.

Here new instructions summarized:

module load purge
module load gnu12
module load openmpi4
module load gsl
# Create your own python virtual environment (v-env)
python3.11 -m venv $HOME/venv311/xpsi
source $HOME/venv311/xpsi/bin/activate
pip install --upgrade pip setuptools wheel
pip install scipy 'Cython<3' matplotlib wrapt pymultinest getdist h5py pytest nestcheck mpi4py
cd
mkdir My_codes
cd My_Codes
# build multinest. We don't install it, but we copy the library files into our v-env
git clone https://github.com/farhanferoz/MultiNest.git multinest
cd  multinest/MultiNest_v3.12_CMake/multinest
mkdir -p build
cd build
CC=$(which cc) FC=$(which mpif90) CXX=$(which c++) cmake -DCMAKE_{C,CXX}_FLAGS="-O3 -march=native -funroll-loops" -DCMAKE_Fortran_FLAGS="-O3 -march=native -funroll-loops" ..
make
cd ../lib
cp * $VIRTUAL_ENV/lib/.
cd; cd $VIRTUAL_ENV/lib/
cp /usr/lib64/liblapack.so.3 .
cp /usr/lib64/libblas.so.3 .
cp -r /usr/lib64/atlas .
# Set the library path
export LD_LIBRARY_PATH=$VIRTUAL_ENV/lib:$LD_LIBRARY_PATH
# If the above works, we continue with building xpsi
cd
cd My_Codes
git clone https://github.com/xpsi-group/xpsi.git
cd xpsi
CC=$(which cc) python setup.py build
CC=$(which cc) python setup.py install
=======================================================================================================
So in your slurm jobs you should use this setup before running your command.
module purge
module load gnu12
module load openmpi4
module load gsl
source $HOME/venv311/xpsi/bin/activate
export LD_LIBRARY_PATH=$VIRTUAL_ENV/lib:$LD_LIBRARY_PATH