Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions cmake/MFCTargets.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -269,10 +269,17 @@ exit 0
PRIVATE -DFRONTIER_UNIFIED)
endif()

find_library(HIP_LIB amdhip64
HINTS "$ENV{OLCF_AFAR_ROOT}/lib" "$ENV{OLCF_AFAR_ROOT}/lib/llvm/lib" REQUIRED)
# Search the AFAR drop first: the ROCm module also ships
# libhipfort-amdgcn.a, and HINTS lose to CMAKE_PREFIX_PATH, which
# would pair the drop's .mod files with another flang's archive.
find_library(HIP_LIB amdhip64
PATHS "$ENV{OLCF_AFAR_ROOT}/lib" "$ENV{OLCF_AFAR_ROOT}/lib/llvm/lib"
NO_DEFAULT_PATH)
find_library(HIP_LIB amdhip64 REQUIRED)
find_library(HIPFORT_AMDGCN_LIB hipfort-amdgcn
HINTS "$ENV{OLCF_AFAR_ROOT}/lib" "$ENV{OLCF_AFAR_ROOT}/lib/llvm/lib" REQUIRED)
PATHS "$ENV{OLCF_AFAR_ROOT}/lib" "$ENV{OLCF_AFAR_ROOT}/lib/llvm/lib"
NO_DEFAULT_PATH)
find_library(HIPFORT_AMDGCN_LIB hipfort-amdgcn REQUIRED)
Comment thread
sbryngelson marked this conversation as resolved.
# The hipfort module dir moved to lib/llvm/include in newer AFAR
# (therock) drops; keep the classic path for Frontier's layout.
target_include_directories(${a_target} PRIVATE
Expand Down
12 changes: 8 additions & 4 deletions toolchain/bootstrap/modules.sh
Original file line number Diff line number Diff line change
Expand Up @@ -234,15 +234,19 @@ if [ ! -z ${CRAY_LD_LIBRARY_PATH+x} ] && [ "$u_c" '!=' 'c' ] && [ "$u_c" '!=' '
fi

if [ "$u_c" '==' 'famd' ]; then
export OLCF_AFAR_ROOT="/sw/crusher/ums/compilers/afar/therock-23.1.0-gfx90a-7.12.0-bb5005b6"
export OLCF_AFAR_ROOT="${OLCF_AFAR_ROOT:-/sw/crusher/ums/compilers/afar/therock-afar-23.2.1-gfx90a-7.13.0-7357b5084b}"

export PATH=${OLCF_AFAR_ROOT}/lib/llvm/bin:${PATH}
export LD_LIBRARY_PATH=${OLCF_AFAR_ROOT}/lib:${OLCF_AFAR_ROOT}/lib/llvm/lib:${LD_LIBRARY_PATH}
# Pinned: cray-mpich's libmpifort_amd.so needs the classic-flang runtimes
# (libpgmath/libflang/libflangrti/libompstub), which no AFAR drop ships and
# which ROCm dropped after 7.0.2. Do not retarget at $ROCM_PATH.
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/rocm-7.0.2/lib/llvm/lib:/opt/rocm-7.0.2/lib/
Comment thread
sbryngelson marked this conversation as resolved.
Comment thread
sbryngelson marked this conversation as resolved.

export CRAY_MPICH_INC="-I${OLCF_AFAR_ROOT}/include/mpich3.4a2"
export CRAY_HIPFORT_INC="-I${OLCF_AFAR_ROOT}/include/hipfort/amdgcn"
export CRAY_HIPFORT_LIB="-L${OLCF_AFAR_ROOT}/lib -lhipfort-amdgcn -lhipfft -lamdhip64"
# AFAR >= 23.2: no mpich3.4a2, hipfort moved under lib/llvm.
export CRAY_MPICH_INC="-I${OLCF_AFAR_ROOT}/include/mpich4.3.1"
export CRAY_HIPFORT_INC="-I${OLCF_AFAR_ROOT}/lib/llvm/include/hipfort/amdgcn"
export CRAY_HIPFORT_LIB="-L${OLCF_AFAR_ROOT}/lib -L${OLCF_AFAR_ROOT}/lib/llvm/lib -lhipfort-amdgcn -lhipfft -lamdhip64"
export CRAY_HIP_INC="-I${OLCF_AFAR_ROOT}/include/hip"
export CRAY_MPICH_LIB="-L${CRAY_MPICH_PREFIX}/lib \
${CRAY_PMI_POST_LINK_OPTS} \
Expand Down
Loading