From 23b350c9feaa379f452fa20706f893ab6381e1e7 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Sun, 10 Sep 2023 19:00:06 -0600 Subject: [PATCH 1/4] Rename var/spack/repos/builtin/packages/python/cray-rpath-3.1.patch as var/spack/repos/builtin/packages/python/rpath-non-gcc.patch and apply unconditionally --- var/spack/repos/builtin/packages/python/package.py | 4 ++-- .../python/{cray-rpath-3.1.patch => rpath-non-gcc.patch} | 0 2 files changed, 2 insertions(+), 2 deletions(-) rename var/spack/repos/builtin/packages/python/{cray-rpath-3.1.patch => rpath-non-gcc.patch} (100%) diff --git a/var/spack/repos/builtin/packages/python/package.py b/var/spack/repos/builtin/packages/python/package.py index 7e25714a88fc7c..0cf74cfba6b437 100644 --- a/var/spack/repos/builtin/packages/python/package.py +++ b/var/spack/repos/builtin/packages/python/package.py @@ -286,8 +286,8 @@ class Python(Package): patch("tkinter-3.10.patch", when="@3.10.0:3.10 ~tkinter") patch("tkinter-3.11.patch", when="@3.11.0:3.11 ~tkinter") - # Ensure that distutils chooses correct compiler option for RPATH on cray: - patch("cray-rpath-3.1.patch", when="@3 platform=cray") + # Ensure that distutils chooses correct compiler option for RPATH: + patch("rpath-non-gcc.patch") # Ensure that distutils chooses correct compiler option for RPATH on fj: patch("fj-rpath-3.1.patch", when="@:3.9.7,3.10.0 %fj") diff --git a/var/spack/repos/builtin/packages/python/cray-rpath-3.1.patch b/var/spack/repos/builtin/packages/python/rpath-non-gcc.patch similarity index 100% rename from var/spack/repos/builtin/packages/python/cray-rpath-3.1.patch rename to var/spack/repos/builtin/packages/python/rpath-non-gcc.patch From 5d9f1c7b46d2ba45a4c1acfa9cf2641eef5318f3 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Sun, 10 Sep 2023 19:58:51 -0600 Subject: [PATCH 2/4] Add missing dependencies blas and lapack to gsi-env virtual package --- var/spack/repos/jcsda-emc-bundles/packages/gsi-env/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/jcsda-emc-bundles/packages/gsi-env/package.py b/var/spack/repos/jcsda-emc-bundles/packages/gsi-env/package.py index 01500d65c7c7d4..58c9f4bd8f52b9 100644 --- a/var/spack/repos/jcsda-emc-bundles/packages/gsi-env/package.py +++ b/var/spack/repos/jcsda-emc-bundles/packages/gsi-env/package.py @@ -16,6 +16,8 @@ class GsiEnv(BundlePackage): version("1.0.0") + depends_on("blas") + depends_on("lapack") depends_on("netcdf-c") depends_on("netcdf-fortran") depends_on("bufr") From 79fd79d79c748b2891cfc35fcfb676cb43234fd6 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Mon, 11 Sep 2023 08:52:55 -0600 Subject: [PATCH 3/4] Add conflict statements for mapl variants pflogger and extdata2g with intel@2021.7 and later --- var/spack/repos/builtin/packages/mapl/package.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/var/spack/repos/builtin/packages/mapl/package.py b/var/spack/repos/builtin/packages/mapl/package.py index 54cef1e40e96da..2eb2eda6126d18 100644 --- a/var/spack/repos/builtin/packages/mapl/package.py +++ b/var/spack/repos/builtin/packages/mapl/package.py @@ -175,6 +175,10 @@ class Mapl(CMakePackage): values=("Debug", "Release", "Aggressive"), ) + # https://github.com/JCSDA/spack-stack/issues/769 + conflicts("+pflogger", when="@:2.40.3 %intel@2021.7:") + conflicts("+extdata2g", when="@:2.40.3 %intel@2021.7:") + depends_on("cmake@3.17:", type="build") depends_on("mpi") depends_on("hdf5") From 2b150c8718c8b012881d8606d571e13c33f67498 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Mon, 11 Sep 2023 14:43:31 -0600 Subject: [PATCH 4/4] Revert previous change for tcl modulefiles to test for both LMOD_VERSION and LMOD_VERSION_MAJOR --- lib/spack/spack/test/modules/tcl.py | 45 +++----------------- share/spack/templates/modules/modulefile.tcl | 2 +- 2 files changed, 6 insertions(+), 41 deletions(-) diff --git a/lib/spack/spack/test/modules/tcl.py b/lib/spack/spack/test/modules/tcl.py index 1c3bd562b665cb..af511f72e9ad98 100644 --- a/lib/spack/spack/test/modules/tcl.py +++ b/lib/spack/spack/test/modules/tcl.py @@ -38,14 +38,7 @@ def test_autoload_direct(self, modulefile_content, module_configuration): content = modulefile_content(mpileaks_spec_string) assert ( - len( - [ - x - for x in content - if "if {![info exists ::env(LMOD_VERSION_MAJOR)] && ![info exists ::env(LMOD_VERSION)]} {" # noqa: E501 - in x - ] - ) + len([x for x in content if "if {![info exists ::env(LMOD_VERSION_MAJOR)]} {" in x]) == 1 ) assert len([x for x in content if "depends-on " in x]) == 2 @@ -59,14 +52,7 @@ def test_autoload_direct(self, modulefile_content, module_configuration): content = modulefile_content("dtbuild1") assert ( - len( - [ - x - for x in content - if "if {![info exists ::env(LMOD_VERSION_MAJOR)] && ![info exists ::env(LMOD_VERSION)]} {" # noqa: E501 - in x - ] - ) + len([x for x in content if "if {![info exists ::env(LMOD_VERSION_MAJOR)]} {" in x]) == 1 ) assert len([x for x in content if "depends-on " in x]) == 2 @@ -83,14 +69,7 @@ def test_autoload_all(self, modulefile_content, module_configuration): content = modulefile_content(mpileaks_spec_string) assert ( - len( - [ - x - for x in content - if "if {![info exists ::env(LMOD_VERSION_MAJOR)] && ![info exists ::env(LMOD_VERSION)]} {" # noqa: E501 - in x - ] - ) + len([x for x in content if "if {![info exists ::env(LMOD_VERSION_MAJOR)]} {" in x]) == 1 ) assert len([x for x in content if "depends-on " in x]) == 5 @@ -104,14 +83,7 @@ def test_autoload_all(self, modulefile_content, module_configuration): content = modulefile_content("dtbuild1") assert ( - len( - [ - x - for x in content - if "if {![info exists ::env(LMOD_VERSION_MAJOR)] && ![info exists ::env(LMOD_VERSION)]} {" # noqa: E501 - in x - ] - ) + len([x for x in content if "if {![info exists ::env(LMOD_VERSION_MAJOR)]} {" in x]) == 1 ) assert len([x for x in content if "depends-on " in x]) == 2 @@ -504,14 +476,7 @@ def test_autoload_with_constraints(self, modulefile_content, module_configuratio # Test the mpileaks that should NOT have the autoloaded dependencies content = modulefile_content("mpileaks ^mpich") assert ( - len( - [ - x - for x in content - if "if {![info exists ::env(LMOD_VERSION_MAJOR)] && ![info exists ::env(LMOD_VERSION)]} {" # noqa: E501 - in x - ] - ) + len([x for x in content if "if {![info exists ::env(LMOD_VERSION_MAJOR)]} {" in x]) == 0 ) assert len([x for x in content if "depends-on " in x]) == 0 diff --git a/share/spack/templates/modules/modulefile.tcl b/share/spack/templates/modules/modulefile.tcl index 76195df2e5e69e..52d987da61b136 100644 --- a/share/spack/templates/modules/modulefile.tcl +++ b/share/spack/templates/modules/modulefile.tcl @@ -27,7 +27,7 @@ proc ModulesHelp { } { {% block autoloads %} {% if autoload|length > 0 %} -if {![info exists ::env(LMOD_VERSION_MAJOR)] && ![info exists ::env(LMOD_VERSION)]} { +if {![info exists ::env(LMOD_VERSION_MAJOR)]} { {% for module in autoload %} module load {{ module }} {% endfor %}