Skip to content

Commit 0d511d7

Browse files
committed
Load python on chicoma-cpu only before spack build
1 parent b4f77e6 commit 0d511d7

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

mache/spack/__init__.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,8 @@ def make_spack_env(spack_path, env_name, spack_specs, compiler, mpi,
118118
continue
119119
bash_script = template.render(
120120
e3sm_lapack=include_e3sm_lapack,
121-
e3sm_hdf5_netcdf=include_e3sm_hdf5_netcdf)
121+
e3sm_hdf5_netcdf=include_e3sm_hdf5_netcdf,
122+
build_spack=True)
122123

123124
modules = f'{modules}\n{bash_script}'
124125

@@ -248,7 +249,8 @@ def get_spack_script(spack_path, env_name, compiler, mpi, shell, machine=None,
248249
continue
249250
shell_script = template.render(
250251
e3sm_lapack=include_e3sm_lapack,
251-
e3sm_hdf5_netcdf=include_e3sm_hdf5_netcdf)
252+
e3sm_hdf5_netcdf=include_e3sm_hdf5_netcdf,
253+
build_spack=False)
252254
load_script = f'{load_script}\n{shell_script}'
253255

254256
if modules_after:
@@ -350,7 +352,8 @@ def get_modules_env_vars_and_mpi_compilers(machine, compiler, mpi, shell,
350352
continue
351353
shell_script = template.render(
352354
e3sm_lapack=include_e3sm_lapack,
353-
e3sm_hdf5_netcdf=include_e3sm_hdf5_netcdf)
355+
e3sm_hdf5_netcdf=include_e3sm_hdf5_netcdf,
356+
build_spack=False)
354357
mod_env_commands = f'{mod_env_commands}\n{shell_script}'
355358

356359
mpicc, mpicxx, mpifc = _get_mpi_compilers(machine, compiler, mpi,

mache/spack/chicoma-cpu_gnu_mpich.csh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ module load cray-hdf5-parallel/1.12.2.3 \
4444
cray-netcdf-hdf5parallel/4.9.0.3 \
4545
cray-parallel-netcdf/1.12.3.3
4646
{% endif %}
47+
{% if build_spack %}
48+
module load python
49+
{% endif %}
4750

4851
setenv MPICH_ENV_DISPLAY 1
4952
setenv MPICH_VERSION_DISPLAY 1

mache/spack/chicoma-cpu_gnu_mpich.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ module load cray-hdf5-parallel/1.12.2.3 \
4444
cray-netcdf-hdf5parallel/4.9.0.3 \
4545
cray-parallel-netcdf/1.12.3.3
4646
{% endif %}
47+
{% if build_spack %}
48+
module load python
49+
{% endif %}
4750

4851
export MPICH_ENV_DISPLAY=1
4952
export MPICH_VERSION_DISPLAY=1

0 commit comments

Comments
 (0)