Skip to content

Commit eb22e35

Browse files
author
Cameron Rutherford
authoredMay 23, 2024··
Small spack changes to cleanup spack process on HPC Clusters (#133)
* Add small spack changes to cleanup spack process on Deception. * Extend fixes to all PNNL platforms.
1 parent 84fdbf2 commit eb22e35

File tree

4 files changed

+25
-8
lines changed

4 files changed

+25
-8
lines changed
 

‎buildsystem/spack/deception/env.sh

+10-3
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,24 @@
11
#!/bin/bash
22

3+
# Just for CI
34
source /etc/profile.d/modules.sh
4-
module purge
55

66
# Load system python
7-
module load python/miniconda3.9
8-
source /share/apps/python/miniconda3.9/etc/profile.d/conda.sh
7+
module rm python
8+
module load python/miniconda3.9 >/dev/null 2>&1
9+
source /share/apps/python/miniconda3.9/etc/profile.d/conda.sh >/dev/null 2>&1
910

1011
# Load system modules
12+
module rm gcc
1113
module load gcc/9.1.0
14+
module rm cuda
1215
module load cuda/11.4
16+
module rm openmpi
1317
module load openmpi/4.1.0mlx5.0
1418

19+
# Print modules for sanity
20+
module list
21+
1522
# Define environment variables for where spack stores key files
1623
# For now, SPACK_INSTALL is the path where everything spack related is installed
1724
# If you want to modify the module install path, edit the spack.yaml manually

‎buildsystem/spack/incline/env.sh

+5-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ module purge
88
# MPI module is finnicky on incline
99
modules=$(module list 2>&1)
1010
if echo $modules | grep -q 'openmpi'; then
11-
module load gcc/8.4.0
12-
module rm openmpi
11+
module load gcc/8.4.0
12+
module rm openmpi
1313
fi
1414

1515
# Configure python and other system modules
@@ -20,6 +20,9 @@ module load openmpi/4.1.4
2020
module load rocm/5.3.0
2121
module load python/3.7.0
2222

23+
# Print out modules for sanity
24+
module list
25+
2326
# Try forcing behaviour of spack compiler
2427
export SPACK_CC=$(which gcc)
2528
export SPACK_CXX=$(which g++)

‎buildsystem/spack/load_spack.sh

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ fi
1010
MY_CLUSTER="${MY_CLUSTER:?MY_CLUSTER is unset. Please set manually.}"
1111
[[ -z $MY_CLUSTER ]] && return 1
1212

13-
echo "$MY_CLUSTER" | awk '{print tolower($0)}'
1413
# Use ${var,,} to convert to lower case
1514
# There must be an existing folder for the cluster
1615
if [ ! -d "./buildsystem/spack/${MY_CLUSTER}" ]; then

‎buildsystem/spack/newell/env.sh

+10-2
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,24 @@
11
#!/bin/bash
22

3+
# Just for CI
34
. /etc/profile.d/modules.sh
45

56
# Load system python
6-
module load python/miniconda3.8
7-
. /share/apps/python/miniconda3.8/etc/profile.d/conda.sh
7+
module rm python
8+
module load python/miniconda3.8 >/dev/null 2>&1
9+
. /share/apps/python/miniconda3.8/etc/profile.d/conda.sh >/dev/null 2>&1
810

911
# Load compiler/system modules
12+
module rm gcc
1013
module load gcc/8.5.0
14+
module rm cuda
1115
module load cuda/11.4
16+
module rm openmpi
1217
module load openmpi/4.1.4
1318

19+
# Print modules for sanity
20+
module list
21+
1422
# Define environment variables for where spack stores key files
1523
# For now, SPACK_INSTALL is the path where everything spack related is installed
1624
# If you want to modify the module install path, edit the spack.yaml manually

0 commit comments

Comments
 (0)
Please sign in to comment.