Installing on UF HPC - AstroGPU/swarm GitHub Wiki
UF HPC has all of the dependencies we need in the module system. CMake cannot automatically find the dependencies using the module system. We need to use a script similar to this to specify all the dependencies in the CMake:
module load cmake cuda python/2.7.3.shared boost
cmake .. \
-DCMAKE_C_FLAGS="-O3 -march=native" \
-DCMAKE_CXX_FLAGS="-O3 -march=native" \
-DCUDA_TOOLKIT_ROOT_DIR=${HPC_CUDA_DIR} \
-DBOOST_ROOT=${BOOST_ROOT} \
-DPYTHON_LIBRARIES=${PYTHONHOME}/lib/libpython2.7.so \
-DPYTHON_INCLUDE_DIR=${PYTHONHOME}/include/python2.7First line loads the required modules. It basically sets the environment variables that we are using in the next line. Next line is a CMake command that sets the value of several CMake variables from environment variables.
In order to test or run swarm applications, you would need to submit jobs to `gpu` queue. For example:
#!/bin/bash # #PBS -q gpu #PBS -l nodes=1:ppn=1:gpus=1:fermi #PBS -l walltime=00:30:00 #PBS -N SwarmTest #PBS -d /path/to/swarm/build echo On Host $HOSTNAME export CUDA_DEVICE=`sed -e 's/.*-gpu//g' < $PBS_GPUFILE` echo Running on GPU: $CUDA_DEVICE make test
On the 7th line, change the part after -d to the absolute path to your Swarm-NG build directory, (e.g. the directory from which you run cmake).