Commit 4c1d567f authored by Hamilton, Steven P's avatar Hamilton, Steven P
Browse files

Adding build script.

parent b3614ad4
#!/bin/bash -l
#
# Script to build the raytrace code on different systems.
#
# Author: Mark Berrill, modified by Steven Hamilton
#
function usage {
echo "Usage: ./build_profugus <type of build>"
echo ""
echo " Default: compiles the code for current host"
echo ""
echo " Possible build types values: gnu, xl, pgi, clang"
exit
}
if [[ $1 == "-h" || $1 == "--help" ]]
then
usage
exit
fi
# Clear existing modules
module unload clang gnu pgi xl xlf cuda kokkos cmake
module purge
module load gcc/4.8.5
module load cmake
module load git
module load hdf5
module load cuda
module load spectrum_mpi
module load netlib-lapack
rm -rf CMake*
echo cmake \
-DCMAKE_BUILD_TYPE:STRING=Release \
-DProfugus_ENABLE_CXX11:BOOL=ON \
-DCMAKE_C_COMPILER="${MPI_ROOT}/bin/mpicc" \
-DCMAKE_CXX_COMPILER="${MPI_ROOT}/bin/mpicxx" \
-DBUILD_SHARED_LIBS:BOOL=OFF \
-DTPL_ENABLE_MPI:BOOL=ON \
-DMPI_BASE_DIR:PATH=${MPI_ROOT} \
-DTPL_ENABLE_DLlib=OFF \
-DTPL_ENABLE_HDF5:BOOL=ON \
-DProfugus_ASSERT_MISSING_PACKAGES:BOOL=OFF \
-DTPL_ENABLE_CUDA:BOOL=ON \
-DProfugus_ENABLE_CUDA:BOOL=ON \
-DCUDA_PROPAGATE_HOST_FLAGS:BOOL=OFF \
-DCUDA_NVCC_FLAGS:STRING="--std=c++11;-arch=sm_60;-Xptxas=-dlcm=cg" \
-DProfugus_ENABLE_TESTS:BOOL=OFF \
-DProfugus_ENABLE_MC:BOOL=ON \
-DProfugus_ENABLE_CUDA:BOOL=ON \
-DProfugus_ENABLE_CudaUtils:BOOL=ON \
src
cmake \
-DCMAKE_BUILD_TYPE:STRING=Release \
-DProfugus_ENABLE_CXX11:BOOL=ON \
-DCMAKE_C_COMPILER="${MPI_ROOT}/bin/mpicc" \
-DCMAKE_CXX_COMPILER="${MPI_ROOT}/bin/mpicxx" \
-DBUILD_SHARED_LIBS:BOOL=OFF \
-DTPL_ENABLE_MPI:BOOL=ON \
-DMPI_BASE_DIR:PATH=${MPI_ROOT} \
-DTPL_ENABLE_DLlib=OFF \
-DTPL_ENABLE_HDF5:BOOL=ON \
-DProfugus_ASSERT_MISSING_PACKAGES:BOOL=OFF \
-DTPL_ENABLE_CUDA:BOOL=ON \
-DProfugus_ENABLE_CUDA:BOOL=ON \
-DCUDA_PROPAGATE_HOST_FLAGS:BOOL=OFF \
-DCUDA_NVCC_FLAGS:STRING="--std=c++11;-arch=sm_60;-Xptxas=-dlcm=cg" \
-DProfugus_ENABLE_TESTS:BOOL=OFF \
-DProfugus_ENABLE_MC:BOOL=ON \
-DProfugus_ENABLE_CUDA:BOOL=ON \
-DProfugus_ENABLE_CudaUtils:BOOL=ON \
src
make -j 8
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment