Skip to content

Commit

Permalink
modules: update section using same script (#290)
Browse files Browse the repository at this point in the history
  • Loading branch information
alalazo committed Nov 9, 2023
1 parent 17113d9 commit 90a61ed
Show file tree
Hide file tree
Showing 25 changed files with 346 additions and 523 deletions.
23 changes: 23 additions & 0 deletions outputs/modules.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
diff --git a/lib/spack/spack/config.py b/lib/spack/spack/config.py
index cd1be71c9d..a8259104f5 100644
--- a/lib/spack/spack/config.py
+++ b/lib/spack/spack/config.py
@@ -1275,12 +1275,12 @@ def process_config_path(path):
quote = "['\"]"
not_quote = "[^'\"]"

- if re.match(f"^{quote}", path):
- m = re.match(rf"^({quote}{not_quote}+{quote})$", path)
- if not m:
- raise ValueError("Quotes indicate value, but there are additional path entries")
- result.append(m.group(1))
- break
+ # if re.match(f"^{quote}", path):
+ # m = re.match(rf"^({quote}{not_quote}+{quote})$", path)
+ # if not m:
+ # raise ValueError("Quotes indicate value, but there are additional path entries")
+ # result.append(m.group(1))
+ # break

return result

22 changes: 17 additions & 5 deletions outputs/modules.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ project="$(dirname "$0")"
rm -rf "${raw_outputs:?}/modules"
. "$project/init_spack.sh"

# Workaround for #40944 present in Spack v0.21.0
git -C ~/spack apply /project/modules.patch

# reinit modules
rm -f ~/.spack/modules.yaml ~/.spack/linux/modules.yaml
rm -f ~/.spack/compilers.yaml ~/.spack/linux/compilers.yaml
Expand All @@ -24,6 +27,15 @@ spack install lmod
. share/spack/setup-env.sh
spack install gcc@12

example --tee modules/what-are-modules-1 "module show gcc"
example --tee modules/what-are-modules-2 "which gcc"
example --tee modules/what-are-modules-2 "module load gcc"
module load gcc
example --tee modules/what-are-modules-2 "which gcc"
example --tee modules/what-are-modules-3 "module unload gcc"
module unload gcc
example --tee modules/what-are-modules-3 "which gcc"

example --tee modules/spack-load-gcc "spack load gcc@12"
spack load gcc@12
example modules/spack-load-gcc "which gcc"
Expand All @@ -45,12 +57,12 @@ example --tee modules/module-avail-2 "module avail"

gcc_hash="$(spack find --format '{hash:7}' gcc)"
gcc_module="gcc/12.3.0-gcc-11.4.0-${gcc_hash}"
example --tee modules/module-show-1 "module show $gcc_module"
example --tee modules/module-show-1 "module show gcc"

spack config add "modules:default:tcl:all:filter:exclude_env_vars:['C_INCLUDE_PATH', 'CPLUS_INCLUDE_PATH', 'LIBRARY_PATH']"
spack config add "modules:default:tcl:all:filter:exclude_env_vars:['CC', 'CXX', 'F77', 'FC']"

example modules/tcl-refresh-1 "spack module tcl refresh -y"
example --tee modules/module-show-2 "module show $gcc_module"
example --tee modules/module-show-2 "module show gcc"


spack config add "modules:default:tcl:exclude:['%gcc@11']"
Expand All @@ -60,7 +72,7 @@ example --tee modules/module-avail-3 "module avail"

spack config add "modules:default:tcl:include:[gcc]"
example modules/tcl-refresh-3 "spack module tcl refresh -y"
example --tee modules/module-avail-4 "module avail $gcc_module"
example --tee modules/module-avail-4 "module avail gcc/"


spack config add "modules:default:tcl:hash_length:0"
Expand All @@ -76,7 +88,7 @@ example modules/tcl-refresh-5 "spack module tcl refresh --delete-tree
example --tee modules/module-avail-5 "module avail"


spack config add "modules:default:tcl:all:environment:set:\"{name}_ROOT\":\"{prefix}\""
spack config add 'modules:default:tcl:all:environment:set:\"{name}_ROOT\":\"{prefix}\"'
example modules/tcl-refresh-6 "spack module tcl refresh -y"
example --tee modules/module-show-3 "module show gcc"

Expand Down
38 changes: 22 additions & 16 deletions outputs/modules/lapack-conflict.out
Original file line number Diff line number Diff line change
@@ -1,28 +1,33 @@
$ module list

Currently Loaded Modules:
1) gcc/12.1.0 3) libpciaccess/0.17 5) xz/5.4.1 7) libxml2/2.10.3 9) hwloc/2.9.1 11) bzip2/1.0.8 13) zstd/1.5.5 15) gettext/0.21.1 17) krb5/1.20.1 19) libxcrypt/4.4.33 21) libevent/2.1.12 23) openmpi/4.1.5
2) openblas/0.3.23 4) libiconv/1.17 6) zlib/1.2.13 8) ncurses/6.4 10) numactl/2.0.14 12) pigz/2.7 14) tar/1.34 16) openssl/1.1.1t 18) libedit/3.1-20210216 20) openssh/9.3p1 22) pmix/4.2.3 24) netlib-scalapack/2.2.0-openblas
1) gmp/6.2.1 4) zlib-ng/2.1.4 7) openblas/0.3.24 10) xz/5.4.1 13) hwloc/2.9.1 16) pigz/2.7 19) openssl/3.1.3 22) libxcrypt/4.4.35 25) pmix/5.0.1
2) mpfr/4.2.0 5) zstd/1.5.5 8) libpciaccess/0.17 11) libxml2/2.10.3 14) numactl/2.0.14 17) tar/1.34 20) krb5/1.20.1 23) openssh/9.5p1 26) openmpi/4.1.6
3) mpc/1.3.1 6) gcc/12.3.0 9) libiconv/1.17 12) ncurses/6.4 15) bzip2/1.0.8 18) gettext/0.22.3 21) libedit/3.1-20210216 24) libevent/2.1.12 27) netlib-scalapack/2.2.0-openblas



$ module avail

----------------------------------------------------------------------------------------- /home/spack/spack/share/spack/lmod/linux-ubuntu22.04-x86_64/openmpi/4.1.5-ekmi64f/gcc/12.1.0 ------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------- /home/spack/spack/share/spack/lmod/linux-ubuntu22.04-x86_64/openmpi/4.1.6-fnistzv/gcc/12.3.0 ------------------------------------------------------------------------------------------
netlib-scalapack/2.2.0-netlib-lapack netlib-scalapack/2.2.0-openblas (L,D)

---------------------------------------------------------------------------------------------------- /home/spack/spack/share/spack/lmod/linux-ubuntu22.04-x86_64/gcc/12.1.0 -----------------------------------------------------------------------------------------------------
autoconf/2.69 expat/2.5.0 libedit/3.1-20210216 (L) libtool/2.4.7 ninja/1.11.1 pkgconf/1.9.5 py-numpy/1.24.3-openblas py-scipy/1.10.1-openblas tar/1.34 (L)
automake/1.16.5 findutils/4.9.0 libevent/2.1.12 (L) libxcrypt/4.4.33 (L) numactl/2.0.14 (L) pmix/4.2.3 (L) py-packaging/23.0 py-setuptools/63.4.3 util-linux-uuid/2.38.1
berkeley-db/18.1.40 gdbm/1.23 libfabric/1.18.0 libxml2/2.10.3 (L) openblas/0.3.23 (L) py-beniget/0.4.1 py-pip/23.0 py-tomli/2.0.1 util-macros/1.19.3
bison/3.8.2 gettext/0.21.1 (L) libffi/3.4.4 m4/1.4.19 openmpi/4.1.5 (L) py-build/0.10.0 py-ply/3.11 py-wheel/0.37.1 xz/5.4.1 (L)
bzip2/1.0.8 (L) gmake/4.4.1 libiconv/1.17 (L) meson/1.1.0 openssh/9.3p1 (L) py-cython/0.29.33 py-pybind11/2.10.1 python/3.10.10 yaksa/0.2
ca-certificates-mozilla/2023-01-10 hwloc/2.9.1 (L) libmd/1.0.4 mpich/4.1.1 openssl/1.1.1t (L) py-flit-core/3.7.1 py-pyproject-hooks/1.0.0 re2c/2.2 zlib/1.2.13 (L)
cmake/3.26.3 krb5/1.20.1 (L) libpciaccess/0.17 (L) ncurses/6.4 (L) perl/5.36.0 py-gast/0.5.3 py-pyproject-metadata/0.7.1 readline/8.2 zstd/1.5.5 (L)
diffutils/3.9 libbsd/0.11.7 libsigsegv/2.14 netlib-lapack/3.11.0 pigz/2.7 (L) py-meson-python/0.12.0 py-pythran/0.12.0-openblas sqlite/3.40.1
---------------------------------------------------------------------------------------------------- /home/spack/spack/share/spack/lmod/linux-ubuntu22.04-x86_64/gcc/12.3.0 -----------------------------------------------------------------------------------------------------
amdblis/4.1 diffutils/3.9 (D) libedit/3.1-20210216 (L) libxcrypt/4.4.35 (L) numactl/2.0.14 (L) py-beniget/0.4.1 py-pybind11/2.11.0 sqlite/3.43.2
autoconf/2.69 (D) expat/2.5.0 libevent/2.1.12 (L) libxml2/2.10.3 (L,D) openblas/0.3.24 (L) py-cython/0.29.36 py-pyproject-metadata/0.7.1 tar/1.34 (L,D)
automake/1.16.5 (D) findutils/4.9.0 libfabric/1.19.0 m4/1.4.19 (D) openmpi/4.1.6 (L) py-flit-core/3.9.0 py-pythran/0.12.2-openblas util-linux-uuid/2.38.1
berkeley-db/18.1.40 (D) gdbm/1.23 (D) libffi/3.4.4 meson/1.2.2 openssh/9.5p1 (L) py-gast/0.5.3 py-scipy/1.11.3-openblas util-macros/1.19.3
bison/3.8.2 gettext/0.22.3 (L,D) libiconv/1.17 (L,D) mpich/4.1.2 openssl/3.1.3 (L,D) py-meson-python/0.13.1 py-setuptools/68.0.0 xz/5.4.1 (L,D)
bzip2/1.0.8 (L,D) gmake/4.4.1 (D) libmd/1.0.4 ncurses/6.4 (L,D) perl/5.38.0 (D) py-numpy/1.26.1-openblas py-wheel/0.41.2 yaksa/0.3
ca-certificates-mozilla/2023-05-30 (D) hwloc/2.9.1 (L) libpciaccess/0.17 (L) netlib-lapack/3.11.0 pigz/2.7 (L,D) py-packaging/23.1 python/3.11.6 zlib-ng/2.1.4 (L,D)
cmake/3.27.7 krb5/1.20.1 (L) libsigsegv/2.14 (D) nghttp2/1.57.0 (D) pkgconf/1.9.5 (D) py-pip/23.1.2 re2c/2.2 zstd/1.5.5 (L,D)
curl/8.4.0 (D) libbsd/0.11.7 libtool/2.4.7 (D) ninja/1.11.1 pmix/5.0.1 (L) py-ply/3.11 readline/8.2 (D)

------------------------------------------------------------------------------------------------------- /home/spack/spack/share/spack/lmod/linux-ubuntu22.04-x86_64/Core --------------------------------------------------------------------------------------------------------
gcc/12.1.0 (L)
autoconf-archive/2023.02.20 berkeley-db/18.1.40 diffutils/3.9 gdbm/1.23 libiconv/1.17 lmod/8.7.24 m4/1.4.19 nghttp2/1.57.0 pkgconf/1.9.5 texinfo/7.0.3 zstd/1.5.5
autoconf/2.69 bzip2/1.0.8 ed/1.4 gettext/0.22.3 libsigsegv/2.14 lua-luafilesystem/1.8.0 mpc/1.3.1 (L) openssl/3.1.3 readline/8.2 unzip/6.0
automake/1.16.5 ca-certificates-mozilla/2023-05-30 gawk/5.2.2 gmake/4.4.1 libtool/2.4.7 lua-luaposix/36.1 mpfr/4.2.0 (L) perl/5.38.0 tar/1.34 xz/5.4.1
bc/1.07.1 curl/8.4.0 gcc/12.3.0 (L) gmp/6.2.1 (L) libxml2/2.10.3 lua/5.4.4 ncurses/6.4 pigz/2.7 tcl/8.6.12 zlib-ng/2.1.4

Where:
D: Default Module
Expand All @@ -45,9 +50,10 @@ The following have been reloaded with a version change:
$ module list

Currently Loaded Modules:
1) gcc/12.1.0 4) libiconv/1.17 7) libxml2/2.10.3 10) numactl/2.0.14 13) zstd/1.5.5 16) openssl/1.1.1t 19) libxcrypt/4.4.33 22) pmix/4.2.3 25) netlib-scalapack/2.2.0-netlib-lapack
2) openblas/0.3.23 5) xz/5.4.1 8) ncurses/6.4 11) bzip2/1.0.8 14) tar/1.34 17) krb5/1.20.1 20) openssh/9.3p1 23) openmpi/4.1.5
3) libpciaccess/0.17 6) zlib/1.2.13 9) hwloc/2.9.1 12) pigz/2.7 15) gettext/0.21.1 18) libedit/3.1-20210216 21) libevent/2.1.12 24) netlib-lapack/3.11.0
1) gmp/6.2.1 5) zstd/1.5.5 9) libiconv/1.17 13) hwloc/2.9.1 17) tar/1.34 21) libedit/3.1-20210216 25) pmix/5.0.1 29) expat/2.5.0 33) sqlite/3.43.2 37) netlib-lapack/3.11.0
2) mpfr/4.2.0 6) gcc/12.3.0 10) xz/5.4.1 14) numactl/2.0.14 18) gettext/0.22.3 22) libxcrypt/4.4.35 26) openmpi/4.1.6 30) readline/8.2 34) util-linux-uuid/2.38.1 38) netlib-scalapack/2.2.0-netlib-lapack
3) mpc/1.3.1 7) openblas/0.3.24 11) libxml2/2.10.3 15) bzip2/1.0.8 19) openssl/3.1.3 23) openssh/9.5p1 27) libmd/1.0.4 31) gdbm/1.23 35) python/3.11.6
4) zlib-ng/2.1.4 8) libpciaccess/0.17 12) ncurses/6.4 16) pigz/2.7 20) krb5/1.20.1 24) libevent/2.1.12 28) libbsd/0.11.7 32) libffi/3.4.4 36) amdblis/4.1



7 changes: 3 additions & 4 deletions outputs/modules/lapack-correct.out
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,19 @@ Activating Modules:

$ module load mpich

Lmod is automatically replacing "openmpi/4.1.5" with "mpich/4.1.1".
Lmod is automatically replacing "openmpi/4.1.6" with "mpich/4.1.2".


Due to MODULEPATH changes, the following have been reloaded:
1) netlib-scalapack/2.2.0

$ module load netlib-lapack

Lmod is automatically replacing "openblas/0.3.23" with "netlib-lapack/3.11.0".
Lmod is automatically replacing "openblas/0.3.24" with "netlib-lapack/3.11.0".


Inactive Modules:
1) bzip2/1.0.8 3) gdbm/1.23 5) libbsd/0.11.7 7) libmd/1.0.4 9) openssl/1.1.1t 11) py-numpy 13) python/3.10.10 15) sqlite/3.40.1 17) util-linux-uuid/2.38.1
2) expat/2.5.0 4) gettext/0.21.1 6) libffi/3.4.4 8) libxcrypt/4.4.33 10) pigz/2.7 12) py-setuptools/63.4.3 14) readline/8.2 16) tar/1.34 18) zstd/1.5.5
1) py-numpy

Due to MODULEPATH changes, the following have been reloaded:
1) netlib-scalapack/2.2.0
Expand Down

0 comments on commit 90a61ed

Please sign in to comment.