Skip to content

Commit

Permalink
Add bach Chicoma machinefile, fix compile on Crays
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Prather committed Sep 6, 2023
1 parent d4fc511 commit 5c1bbc7
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 1 deletion.
40 changes: 40 additions & 0 deletions machines/chicoma.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# LANL Machines: HPC and IC

# Chicoma
if [[ "$HOST" == "ch-fe"* ]]; then
HOST_ARCH="ZEN2"

# Cray environments get confused easy
# Make things as simple as possible
# TODO version with Cray wrappers?
module purge
export CRAY_CPU_TARGET="x86-64"
if [[ "$ARGS" == *"cuda"* ]]; then
DEVICE_ARCH="AMPERE80"
# System HDF5 can't use compression
EXTRA_FLAGS="-DPARTHENON_DISABLE_HDF5_COMPRESSION=ON $EXTRA_FLAGS"
# Runtime
MPI_NUM_PROCS=4
if [[ "$ARGS" == *"gnu"* ]]; then
module load PrgEnv-gnu cpe-cuda cuda
elif [[ "$ARGS" == *"intel"* ]]; then
module load PrgEnv-intel
elif [[ "$ARGS" == *"nvc++"* ]]; then
module load PrgEnv-nvhpc cray-hdf5-parallel
EXTRA_FLAGS="-DCMAKE_CUDA_COMPILER=$HOME/bin/nvc++-wrapper -DCMAKE_CUDA_COMPILER_ID=NVHPC -DCMAKE_CUDA_COMPILER_VERSION=11.6 $EXTRA_FLAGS"
else
module load PrgEnv-nvhpc cray-hdf5-parallel
fi
else
module load PrgEnv-aocc
fi
module load cmake

# Runtime
MPI_NUM_PROCS=4
MPI_EXE=srun
MPI_EXTRA_ARGS="--cpu-bind=mask_cpu:0x0*16,0x1*16,0x2*16,0x3*16 ~/bin/select-gpu"
unset OMP_NUM_THREADS
unset OMP_PROC_BIND
unset OMP_PLACES
fi
2 changes: 1 addition & 1 deletion make.sh
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ if [[ -z "$CXX_NATIVE" ]]; then
CXX_NATIVE=CC
C_NATIVE=cc
# In case this isn't Cray, use the more common flag
OMP_FLAG="-fopenomp"
#OMP_FLAG="-fopenomp"
# Prefer Intel oneAPI compiler over legacy, both over generic
elif which icpx >/dev/null 2>&1; then
CXX_NATIVE=icpx
Expand Down

0 comments on commit 5c1bbc7

Please sign in to comment.