Skip to content

Commit

Permalink
Merge pull request #323 from PDoakORNL/rocm53_repeatable_build
Browse files Browse the repository at this point in the history
Changes to allow partial builds for changing models etc with ROCM 5.3.0 build
  • Loading branch information
PDoakORNL authored Feb 5, 2024
2 parents 017bae8 + 199c6ea commit f0932a7
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 22 deletions.
9 changes: 1 addition & 8 deletions build-aux/frontier_build.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@

export FFTW_PATH=/lustre/orion/world-shared/cph102/epd/spack/opt/spack/linux-sles15-zen3/gcc-12.2.0/fftw-3.3.10-tajdtzkealhold4bmpuq7wiwzurnclr4
export MAGMA_ROOT=/lustre/orion/world-shared/cph102/epd/spack/opt/spack/linux-sles15-zen3/gcc-12.2.0/magma-2.7.2-gbjcrprqdw7y5uplm5upmqbi65zqwubb
export OPENBLAS_ROOT=/lustre/orion/world-shared/cph102/epd/spack/opt/spack/linux-sles15-zen3/gcc-12.2.0/openblas-0.3.25-t62dxdtaqba6lzrwoy4uddswlprgma6n
export HDF5_ROOT=/lustre/orion/world-shared/cph102/epd/spack/opt/spack/linux-sles15-zen3/gcc-12.2.0/hdf5-1.14.3-3so3g5x2roywum3edvjun7jbhwisei6p
export CMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH}:/opt/rocm-5.7.0/hip/bin:${HDF5_ROOT}
export PATH=/sw/frontier/spack-envs/base/opt/linux-sles15-x86_64/gcc-7.5.0/cmake-3.23.2-4r4mpiba7cwdw2hlakh5i7tchi64s3qd/bin:${PATH}

cmake -DDCA_WITH_CUDA=off -DDCA_WITH_HIP=ON \
-DFFTW_ROOT=$FFTW_PATH \
-DDCA_FIX_BROKEN_MPICH=ON \
Expand All @@ -19,7 +12,7 @@ cmake -DDCA_WITH_CUDA=off -DDCA_WITH_HIP=ON \
-DAMDGPU_TARGETS=gfx90a \
-DCMAKE_C_COMPILER=mpicc \
-DCMAKE_CXX_COMPILER=mpic++ \
-DCMAKE_HIP_COMPILER=/opt/rocm-5.7.0/llvm/bin/clang++ \
-DCMAKE_HIP_COMPILER=/opt/rocm-5.3.0/llvm/bin/clang++ \
-DCMAKE_INSTALL_PREFIX=$INST \
-DCMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH}" \
-GNinja \
Expand Down
24 changes: 16 additions & 8 deletions build-aux/frontier_load_modules.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,24 @@
#
# Usage: source frontier_load_modules.sh


module reset
module load gcc/12.2.0
module load rocm/5.7.0
module load gcc/11.2.0
module load openblas
module load hdf5
module load amd-mixed/5.3.0
module load fftw
module load cmake
module load ninja

# After 2 weeks of digging through opaque linking and runtime errors,
# I have concluded that cray-libsci causes such a mess
# that it's much easier to compile your own openblas
# and magma rather than fuss with it. I did the latter in 1 day.
module unload cray-libsci
module use /sw/frontier/magma/lmod/Core/cce-15.0.0
module load magma/2.7.2
module load craype-accel-amd-gfx90a

export CC=mpicc
export CXX=mpicxx

export OPENBLAS_ROOT=${OLCF_OPENBLAS_ROOT}
export HDF5_ROOT=${OLCF_HDF5_ROOT}
export MAGMA_ROOT=/sw/frontier/magma/opt/linux-sles15-zen3/cce-15.0.0/magma-2.7.2-x7o7sph6npwb73t2leetbgpbypqyhtz6
export FFTW_PATH=${OLCF_FFTW_ROOT}
export LD_PRELOAD=/opt/cray/pe/lib64/cce/libtcmalloc_minimal.so.1
12 changes: 6 additions & 6 deletions cmake/dca_external_libs.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ list(APPEND DCA_EXTERNAL_LIBS ${BLAS_LIBRARIES})
# HDF5

if (NOT HDF5_LIBRARIES)
message("Trying to find HDF5 library")
set(HDF5_NO_FIND_PACKAGE_CONFIG_FILE false)
set(HDF5_PREFER_PARALLEL false)
find_package(HDF5 REQUIRED COMPONENTS C CXX)
message("HDF5: ${HDF5_FOUND} ${HDF5_LIBRARIES}")
mark_as_advanced(HDF5_LIBRARIES)
set(HDF5_NO_FIND_PACKAGE_CONFIG_FILE true)
set(HDF5_PREFER_PARALLEL false)
find_package(HDF5 REQUIRED COMPONENTS C CXX)
message("HDF5: ${HDF5_FOUND} ${HDF5_LIBRARIES}")
mark_as_advanced(HDF5_LIBRARIES)
endif()


################################################################################
# ADIOS2
if (DCA_WITH_ADIOS2)
Expand Down

0 comments on commit f0932a7

Please sign in to comment.