Skip to content

Commit

Permalink
Added build script for Lassen
Browse files Browse the repository at this point in the history
  • Loading branch information
oseikuffuor1 authored and nicolasbock committed Apr 7, 2022
1 parent 12d4b86 commit c6bfe81
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
37 changes: 37 additions & 0 deletions scripts/build_lassen_xl_offload.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/bin/bash

# Make sure all the paths are correct

source setenv_lassen_offload.sh

rm -r build
rm -r install

MY_PATH=$(pwd)

export CC=${CC:=xlc-gpu}
export FC=${FC:=xlf2003-gpu}
export CXX=${CXX:=xlc++-gpu}
export BLAS_VENDOR=${BLAS_VENDOR:=Auto}
export BML_OPENMP=${BML_OPENMP:=yes}
export BML_OMP_OFFLOAD=${BML_OMP_OFFLOAD:=yes}
export BML_CUSPARSE=${BML_CUSPARSE:=yes}
export BML_COMPLEX=${BML_COMPLEX:=no}
export INSTALL_DIR=${INSTALL_DIR:="${MY_PATH}/install"}
export BML_TESTING=${BML_TESTING:=yes}
export CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE:=Release}
export EXTRA_CFLAGS=${EXTRA_CFLAGS:=""}
export EXTRA_LINK_FLAGS=${EXTRA_LINK_FLAGS:=""}
#export EXTRA_LINK_FLAGS=${EXTRA_LINK_FLAGS:="-lm -L/usr/tce/packages/xl/xl-2021.03.11/xlC/16.1.1/lib -libmc++"}
export BLAS_LIBRARIES=${BLAS_LIBRARIES:="-L${LAPACK_DIR} -llapack -lblas"}

./build.sh configure

pushd build
make -j
make install
popd




10 changes: 10 additions & 0 deletions scripts/setenv_lassen_offload.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

#module purge
module load cmake
module load xl/2021.03.11-cuda-11.2.0
module load cuda/11.2.0
module load lapack/3.9.0-xl-2020.11.12
#module load essl
export CUDA_TOOLKIT_ROOT_DIR=${CUDA_TOOLKIT_ROOT_DIR="/usr/tce/packages/cuda/cuda-11.2.0"}

0 comments on commit c6bfe81

Please sign in to comment.