Skip to content

Commit

Permalink
Merge branch 'fix/nvidia-device-mpi' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Prather committed Jan 29, 2024
2 parents 8c67810 + f19d63a commit ae325e0
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 13 deletions.
6 changes: 3 additions & 3 deletions external/kokkos-kernels/KokkosBatched_Util.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -772,8 +772,8 @@ KOKKOS_INLINE_FUNCTION auto subview_wrapper(ViewType v, IdxType1 i1,
}
template <class ViewType, class IdxType1>
KOKKOS_INLINE_FUNCTION auto subview_wrapper(ViewType v, IdxType1 i1,
Kokkos::ALL_t i2,
Kokkos::ALL_t i3,
Kokkos::Impl::ALL_t i2,
Kokkos::Impl::ALL_t i3,
const BatchLayout::Left &layout_tag,
const Trans::Transpose) {
auto sv_nt = subview_wrapper(v, i1, i3, i2, layout_tag);
Expand Down Expand Up @@ -805,7 +805,7 @@ KOKKOS_INLINE_FUNCTION auto subview_wrapper(
}
template <class ViewType, class IdxType1>
KOKKOS_INLINE_FUNCTION auto subview_wrapper(
ViewType v, IdxType1 i1, Kokkos::ALL_t i2, Kokkos::ALL_t i3,
ViewType v, IdxType1 i1, Kokkos::Impl::ALL_t i2, Kokkos::Impl::ALL_t i3,
const BatchLayout::Right &layout_tag, const Trans::Transpose &) {
auto sv_nt = subview_wrapper(v, i1, i3, i2, layout_tag);

Expand Down
2 changes: 1 addition & 1 deletion external/parthenon
Submodule parthenon updated 1 files
+1 −1 external/Kokkos
30 changes: 22 additions & 8 deletions machines/chicoma.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ if [[ "$HOST" == "ch-fe"* || "$HOST" == "nid00"* ]]; then

# Cray environments get confused easy
# Make things as simple as possible
# TODO ONLY NVHPC WORKS
# Only default "nvhpc" module is supported, see HPC docs
module purge
export CRAY_CPU_TARGET="x86-64"
if [[ "$ARGS" == *"cuda"* ]]; then
Expand All @@ -30,7 +30,7 @@ if [[ "$HOST" == "ch-fe"* || "$HOST" == "nid00"* ]]; then
C_NATIVE=nvc
CXX_NATIVE=nvc++
else
module load PrgEnv-nvhpc
module load PrgEnv-nvhpc/8.3.3
fi
module load craype-accel-nvidia80
# GPU runtime opts
Expand All @@ -40,18 +40,32 @@ if [[ "$HOST" == "ch-fe"* || "$HOST" == "nid00"* ]]; then
unset OMP_PLACES

# Sometimes device-side buffers don't work
# if [conditions]
EXTRA_FLAGS="-DPARTHENON_ENABLE_HOST_COMM_BUFFERS=ON $EXTRA_FLAGS"
#else
#export MPICH_GPU_SUPPORT_ENABLED=1
if [[ "$ARGS" == *"hostside"* ]]; then
EXTRA_FLAGS="-DPARTHENON_ENABLE_HOST_COMM_BUFFERS=ON $EXTRA_FLAGS"
else
export MPICH_GPU_SUPPORT_ENABLED=1
export MPICH_GPU_MANAGED_MEMORY_SUPPORT_ENABLED=1
# Use the Cray wrappers else runtime errors (?)
C_NATIVE=cc
CXX_NATIVE=CC
fi

else
# CPU CASE
module load PrgEnv-aocc
MPI_EXTRA_ARGS="--cpus-per-task=2"
fi
module load cmake #cray-hdf5-parallel

# If using system HDF5, disable compression since it's old
if [[ "$ARGS" != *"hdf5"* ]]; then
module load cray-hdf5-parallel
EXTRA_FLAGS="-DPARTHENON_DISABLE_HDF5_COMPRESSION=ON $EXTRA_FLAGS"
fi

module load cmake

# Runtime opts
MPI_EXE="srun"
MPI_NUM_PROCS=""
MPI_NUM_PROCS=${MPI_NUM_PROCS:-4}
fi

7 changes: 6 additions & 1 deletion make.sh
Original file line number Diff line number Diff line change
Expand Up @@ -309,8 +309,13 @@ if [[ "$ARGS" == *"clean"* ]]; then
git apply ../patches/variant-hip.patch
fi
cd -
fi

# HIP also prefers new Kokkos.
# TODO work something out if on HIP machines w/o internet
cd external/parthenon
git submodule update --remote external/Kokkos
cd -
fi

rm -rf build
fi
Expand Down

0 comments on commit ae325e0

Please # to comment.