Skip to content

Commit e63b8d6

Browse files
authored
Migrate GT runners to RHEL9 (#585)
1 parent 75f82f2 commit e63b8d6

File tree

2 files changed

+16
-25
lines changed

2 files changed

+16
-25
lines changed

toolchain/bootstrap/modules.sh

Lines changed: 14 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ fi
6666

6767
log "Loading modules (& env variables) for $M$COMPUTER$CR on $M$CG$CR"'s:'
6868

69-
# Reset modules to default system configuration (unless Phoenix or Carpenter)
70-
if [ "$u_c" != 'p' ] && [ "$u_c" != 'c' ]; then
69+
# Reset modules to default system configuration (unless Carpenter)
70+
if [ "$u_c" != 'c' ]; then
7171
module reset > /dev/null 2>&1
7272
code="$?"
7373

@@ -79,28 +79,21 @@ else
7979
module purge > /dev/null 2>&1
8080
fi
8181

82-
ELEMENTS=($(__extract "$u_c-all") $(__extract "$u_c-$cg"))
82+
ELEMENTS="$(__extract "$u_c-all") $(__extract "$u_c-$cg")"
83+
MODULES=`echo "$ELEMENTS" | tr ' ' '\n' | grep -v = | xargs`
84+
VARIABLES=`echo "$ELEMENTS" | tr ' ' '\n' | grep = | xargs`
8385

84-
for element in ${ELEMENTS[@]}; do
85-
if [[ "$element" != *'='* ]]; then
86-
log " $ module load $M$element$CR"
87-
module load "$element" > /dev/null 2>&1
86+
log " $ module load $MODULES"
87+
if ! module load $MODULES; then
88+
error "Failed to load modules."
8889

89-
# Handle Success / Failure
90-
code=$?
91-
if [ "$code" != '0' ]; then
92-
error "Failed to load module $M$element$CR:"
93-
94-
# Run load again to show error message
95-
module load "$element"
90+
return
91+
fi
9692

97-
return
98-
fi
99-
else
100-
log " $ export $M$element$CR"
101-
export $element
102-
fi
103-
done
93+
if [ $(echo "$VARIABLES" | grep = | wc -c) -gt 0 ]; then
94+
log " $ export $VARIABLES"
95+
export $VARIABLES > /dev/null
96+
fi
10497

10598
# Don't check for Cray paths on Carpenter, otherwise do check if they exist
10699
if [ ! -z ${CRAY_LD_LIBRARY_PATH+x} ] && [ "$u_c" != 'c' ]; then

toolchain/modules

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,8 @@ e-gpu gpu/0.15.4 cuda/11.0.2 nvhpc/22.2 openmpi/4.0.5 cmake/3.19.8
4242
e-gpu CC=nvc CXX=nvc++ FC=nvfortran
4343

4444
p GT Phoenix
45-
p-all python
46-
p-cpu gcc/12.1.0-qgxpzk mvapich2/2.3.7-733lcv
47-
p-gpu nvhpc/22.11 cuda
48-
p-gpu MFC_CUDA_CC=70,80 CC=nvc CXX=nvc++ FC=nvfortran
45+
p-cpu gcc/12.3.0 openmpi/4.1.5
46+
p-gpu nvhpc/24.5 hpcx/2.19-cuda cuda/12.1.1
4947

5048
f OLCF Frontier
5149
f-gpu rocm/5.5.1 craype-accel-amd-gfx90a

0 commit comments

Comments
 (0)