Skip to content

Commit

Permalink
Add scripts for cray compiler on AMD (#746)
Browse files Browse the repository at this point in the history
This one enables both OpenMP offload and MAGMA together
  • Loading branch information
jeanlucf22 authored Dec 6, 2023
1 parent e03e708 commit 5033308
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
36 changes: 36 additions & 0 deletions scripts/build_crusher_cce.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/bin/bash
export LD_PRELOAD=/opt/cray/pe/lib64/cce/libtcmalloc_minimal.so.1

# Make sure all the paths are correct

rm -r build
rm -r install

MY_PATH=$(pwd)

export CC=${CC:=cc}
export FC=${FC:=ftn}
export CXX=${CXX:=CC}
export BLA_VENDOR=${BLA_VENDOR:=OpenBLAS}
export BML_OMP_OFFLOAD=${BML_OMP_OFFLOAD:=yes}
export BML_OFFLOAD_ARCH=${BML_OFFLOAD_ARCH:=AMD}
export BML_ROCSPARSE=${BML_ROCSPARSE:=yes}
export BML_COMPLEX=${BML_COMPLEX:=no}
export BML_OPENMP=${BML_OPENMP:=yes}
export BUILD_DIR=${BUILD_DIR:="${MY_PATH}/build"}
export INSTALL_DIR=${INSTALL_DIR:="${MY_PATH}/install"}
export BML_TESTING=${BML_TESTING:=yes}
export CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE:=Release}
export BML_MAGMA=${BML_MAGMA:=yes}
export MAGMA_ROOT=${OLCF_MAGMA_ROOT}
export EXTRA_FFLAGS=${EXTRA_FCFLAGS:="-hsystem_alloc"}

export BML_NONMPI_PRECOMMAND=${BML_NONMPI_PRECOMMAND:="srun"}
export BML_NONMPI_PRECOMMAND_ARGS=${BML_NONMPI_PRECOMMAND_ARGS:="-n1;-c4;--gpus=1"}

./build.sh configure

pushd build
make -j8
make install
popd
7 changes: 7 additions & 0 deletions scripts/setenv_crusher_cce.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash
module load cce/15.0.1
module load craype-accel-amd-gfx90a
module load rocm/5.1.0
module load cmake
module load openblas
module load magma/2.6.1

0 comments on commit 5033308

Please sign in to comment.