Skip to content

Commit

Permalink
Merge pull request #328 from climbfuji/feature/merge_rel150_into_default
Browse files Browse the repository at this point in the history
Merge release/1.5.0 into jcsda_emc_spack_stack
  • Loading branch information
climbfuji authored Sep 28, 2023
2 parents e8037bc + 8672dc2 commit a90e852
Show file tree
Hide file tree
Showing 11 changed files with 44 additions and 47 deletions.
17 changes: 14 additions & 3 deletions lib/jcsda-emc/spack-stack/stack/meta_modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -750,10 +750,21 @@ def setup_meta_modules():
python_dict = get_matched_dict(compiler_install_dir, python_candidate_list)
logging.info(" ... stack python providers: '{}'".format(python_dict))
if not python_dict:
raise Exception(
"""No matching Python version found. Make sure that the
Python version in the package config matches what spack installed."""
user_input = input(
"No matching Python version found found, proceed without creating Python modules? (yes/no): "
)
if not user_input.lower() in ["yes", "y"]:
raise Exception(
""""No matching Python version found. Make sure that the
Python version in the package config matches what spack installed."""
)
else:
logging.info(
"Metamodule generation completed successfully in {}".format(
meta_module_dir
)
)
return

for compiler_name in compiler_dict.keys():
for compiler_version in compiler_dict[compiler_name]:
Expand Down
45 changes: 5 additions & 40 deletions lib/spack/spack/test/modules/tcl.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion share/spack/templates/modules/modulefile.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}
Expand Down
5 changes: 5 additions & 0 deletions var/spack/repos/builtin/packages/esmf/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,11 @@ def setup_build_environment(self, env):
elif self.compiler.name == "intel" or self.compiler.name == "oneapi":
env.set("ESMF_COMPILER", "intel")
elif self.compiler.name in ["clang", "apple-clang"]:
# Turn off OpenMP with both versions of clang compilers
# to avoid having to add clang OpenMP libraries to the
# Fortran linker command.
env.set("ESMF_OPENMP", "OFF")
#
env.set("ESMF_COMPILER", "gfortranclang")
with self.compiler.compiler_environment():
gfortran_major_version = int(
Expand Down
6 changes: 5 additions & 1 deletion var/spack/repos/builtin/packages/grib-util/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@ class GribUtil(CMakePackage):

homepage = "https://github.com/NOAA-EMC/NCEPLIBS-grib_util"
url = "https://github.com/NOAA-EMC/NCEPLIBS-grib_util/archive/refs/tags/v1.2.3.tar.gz"
git = "https://github.com/NOAA-EMC/NCEPLIBS-grib_util"

maintainers("AlexanderRichert-NOAA", "Hang-Lei-NOAA", "edwardhartnett")

version("1.3.0", commit="9d3c68a")
version("1.2.4", sha256="f021d6df3186890b0b1781616dabf953581d71db63e7c2913360336985ccaec7")
version("1.2.3", sha256="b17b08e12360bb8ad01298e615f1b4198e304b0443b6db35fe990a817e648ad5")

Expand All @@ -25,10 +27,12 @@ class GribUtil(CMakePackage):
depends_on("libpng")
depends_on("zlib")
depends_on("w3emc", when="@1.2.4:")
depends_on("[email protected]:", when="@1.3:")
depends_on("w3nco", when="@:1.2.3")
depends_on("g2")
depends_on("bacio")
depends_on("ip@:3.3.3")
depends_on("ip")
depends_on("ip@:3.3.3", when="@:1.2")
depends_on("sp")

def cmake_args(self):
Expand Down
3 changes: 3 additions & 0 deletions var/spack/repos/builtin/packages/ip/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ class Ip(CMakePackage):

maintainers("t-brown", "AlexanderRichert-NOAA", "edwardhartnett", "Hang-Lei-NOAA")

version("4.3.0", sha256="799308a868dea889d2527d96a0405af7b376869581410fe4cff681205e9212b4")
# Note that versions 4.0-4.2 contain constants_mod module, and should not be used when
# also compiling with packages containing Fortran modules of the same name, namely, FMS.
version("4.1.0", sha256="b83ca037d9a5ad3eb0fb1acfe665c38b51e01f6bd73ce9fb8bb2a14f5f63cdbe")
version("4.0.0", sha256="a2ef0cc4e4012f9cb0389fab6097407f4c623eb49772d96eb80c44f804aa86b8")
version(
Expand Down
4 changes: 4 additions & 0 deletions var/spack/repos/builtin/packages/mapl/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 %[email protected]:")
conflicts("+extdata2g", when="@:2.40.3 %[email protected]:")

depends_on("[email protected]:", type="build")
depends_on("mpi")
depends_on("hdf5")
Expand Down
3 changes: 3 additions & 0 deletions var/spack/repos/builtin/packages/openssl/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,9 @@ class Openssl(Package): # Uses Fake Autotools, should subclass Package
variant(
"shared", default=True, description="Build shared library version", when="platform=darwin"
)
variant(
"shared", default=True, description="Build shared library version", when="platform=cray"
)
variant(
"shared",
default=False,
Expand Down
4 changes: 2 additions & 2 deletions var/spack/repos/builtin/packages/python/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
2 changes: 2 additions & 0 deletions var/spack/repos/jcsda-emc-bundles/packages/gsi-env/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit a90e852

Please sign in to comment.