Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/ubuntu-ci-x86_64-gnu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,10 @@ jobs:
spack stack create env --site linux.default --template ${TEMPLATE} --name ${ENVNAME} --compiler gcc
spack env activate ${ENVDIR}

# Turn off variants "adp" and "jedi" for neptune-dev (NRL internal only)
# Turn off variants "adp", "sdp", and "jedi" for neptune-dev (NRL internal only)
if [[ "${TEMPLATE}" == *"neptune-dev"* ]]; then
sed -i 's/+adp/~adp/g' ${ENVDIR}/spack.yaml
sed -i 's/+sdp/~sdp/g' ${ENVDIR}/spack.yaml
sed -i 's/+jedi/~jedi/g' ${ENVDIR}/spack.yaml
fi

Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/ubuntu-ci-x86_64-oneapi-ifx.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,10 @@ jobs:
spack stack create env --site linux.default --template ${TEMPLATE} --name ${ENVNAME} --compiler oneapi
spack env activate ${ENVDIR}

# Turn off variants "adp" and "jedi" for neptune-dev (NRL internal only)
# Turn off variants "adp", "sdp", and "jedi" for neptune-dev (NRL internal only)
if [[ "${TEMPLATE}" == *"neptune-dev"* ]]; then
sed -i 's/+adp/~adp/g' ${ENVDIR}/spack.yaml
sed -i 's/+sdp/~sdp/g' ${ENVDIR}/spack.yaml
sed -i 's/+jedi/~jedi/g' ${ENVDIR}/spack.yaml
fi

Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/ubuntu-ci-x86_64-oneapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,10 @@ jobs:
spack stack create env --site linux.default --template ${TEMPLATE} --name ${ENVNAME} --compiler oneapi
spack env activate ${ENVDIR}

# Turn off variants "adp" and "jedi" for neptune-dev (NRL internal only)
# Turn off variants "adp", "sdp", and "jedi" for neptune-dev (NRL internal only)
if [[ "${TEMPLATE}" == *"neptune-dev"* ]]; then
sed -i 's/+adp/~adp/g' ${ENVDIR}/spack.yaml
sed -i 's/+sdp/~sdp/g' ${ENVDIR}/spack.yaml
sed -i 's/+jedi/~jedi/g' ${ENVDIR}/spack.yaml
fi

Expand Down
7 changes: 1 addition & 6 deletions configs/templates/neptune-dev-llvm/spack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,7 @@ spack:
- neptune-env +debug +openmp +espc +ncview ^esmf@=9.0.0b11
- neptune-env ~debug ~openmp +espc +ncview ^esmf@=9.0.0b11
- neptune-env +debug ~openmp +espc +ncview ^esmf@=9.0.0b11
# Until we can build the entire set of dependencies for
# neptune-python-env and jedi-neptune-env, we need to
# add the required packages for the NEPTUNE standalone
# model manually
#- neptune-python-env ^neptune-env ~debug +openmp +espc +ncview ^esmf@=9.0.0b11
#- jedi-neptune-env +adp ^neptune-env ~debug +openmp +espc +ncview ^esmf@=9.0.0b11

- py-numpy
- crtm@3.1.3

Expand Down
2 changes: 1 addition & 1 deletion configs/templates/neptune-dev/spack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ spack:
- neptune-env ~debug ~openmp +espc +ncview ^esmf@=9.0.0b11
- neptune-env +debug ~openmp +espc +ncview ^esmf@=9.0.0b11
- neptune-python-env +gittools ^neptune-env ~debug +openmp +espc +ncview ^esmf@=9.0.0b11
- jedi-neptune-env +adp +jedi ^neptune-env ~debug +openmp +espc +ncview ^esmf@=9.0.0b11
- jedi-neptune-env +adp +sdp +jedi ^neptune-env ~debug +openmp +espc +ncview ^esmf@=9.0.0b11
- crtm@3.1.3

packages:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,19 @@ class AdpPreprocessors(MakefilePackage):
"""Unified, model-agnostic software system that processes atmospheric observations for the Navy's numerical weather prediction data assimilation systems"""

homepage = "https://github.nrlmry.navy.mil/ADP/adp-preprocessors/wiki"
#git = "https://github.nrlmry.navy.mil/ADP/adp-preprocessors.git"
git = "https://github.nrlmry.navy.mil/climbfuji/adp-preprocessors.git"
git = "https://github.nrlmry.navy.mil/ADP/adp-preprocessors.git"

maintainers("climbfuji")

#license("UNKNOWN", checked_by="github_user1")

# Update commit once 1.2.0 is released
version("1.2.0", commit="c6f15e46496309c3893416ba4ccec7f003b93550")
version("1.1.0", commit="b2d9d4ffb472eff9ab973ef2a12f574d92c9754b")
# These are not official versions; 1.1.1 lives in @climbfuji's fork.
version("1.1.2", commit="729b0e7572a497b1103d0b8b1e6ff3972efd0d29")
version(
"1.1.1",
git="https://github.nrlmry.navy.mil/climbfuji/adp-preprocessors.git",
commit="c6f15e46496309c3893416ba4ccec7f003b93550"
)
Comment on lines +23 to +29

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are no official versions/tags that can be built with spack-stack, just commits. None of these have ever been used, hence we can rewind the clock and use these version numbers. Makes it easier in the future.


# MakefilePackage dependencies
depends_on("c", type="build")
Expand Down Expand Up @@ -58,7 +61,7 @@ def build(self, spec, prefix):
raise InstallError(f"Compiler {self.compiler.name} not configured")

def install(self, spec, prefix):
for subdir in ['bin', 'lib', 'mod']:
for subdir in ['bin', 'etc', 'lib', 'mod']:
copy_tree(join_path(self.stage.source_path, subdir), join_path(prefix, subdir))

def check(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ class JediNeptuneEnv(BundlePackage):
version("1.0.0")

variant("adp", default=False, description="Build ADP preprocessors")
variant("sdp", default=False, description="Build SDP preprocessors")

variant("jedi", default=False, description="Build JEDI components required for JEDI-NEPTUNE")

Expand All @@ -30,6 +31,9 @@ class JediNeptuneEnv(BundlePackage):
with when("+adp"):
depends_on("adp-preprocessors", type="run")

with when("+sdp"):
depends_on("sdp-preprocessors", type="run")

with when("+jedi"):
# https://github.com/JCSDA/spack-stack/issues/2015
# Changed type from "run" to "build" so that
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)

import subprocess
from pathlib import Path


from spack_repo.builtin.build_systems.makefile import MakefilePackage

from spack.package import *


class SdpPreprocessors(MakefilePackage):
"""Satellite data processor focusing on satellite radiances and GNSS RO."""

homepage = "https://github.nrlmry.navy.mil/NAVGEM/sdp/wiki"
git = "https://github.nrlmry.navy.mil/NAVGEM/sdp.git"

maintainers("climbfuji")

#license("UNKNOWN", checked_by="github_user1")

version("main", branch="main")
# This is branch bugfix/spack_take2 as of 2027/07/16
version("0.1.0", commit="6ba33e328c2d0d4c71b25e157e7f6cb435a67c99")

# MakefilePackage dependencies
depends_on("c", type="build")
depends_on("fortran", type="build")
depends_on("gmake", type="build")

depends_on("mpi")
depends_on("fftw-api")
depends_on("lapack")
depends_on("hdf5@1.14: +fortran")
depends_on("netcdf-c")
depends_on("netcdf-fortran@4.4.4:")
depends_on("esmf@8.5.0:")

def setup_build_environment(self, env: EnvironmentModifications) -> None:
env.set("HDF5_HOME", self.spec["hdf5"].prefix)
env.set("HDF5LIB", self.spec["hdf5"].prefix.lib)
env.set("NETCDFC_HOME", self.spec["netcdf-c"].prefix)
env.set("NETCDFFORTRAN_HOME", self.spec["netcdf-fortran"].prefix)
env.set("ZLIB_LIBDIR", self.spec["zlib-api"].prefix.lib)
# Build with only one thread to avoid race conditions
env.set("MAKE_PROCS", str(1))

def build(self, spec, prefix):
with working_dir("src"):
if self.compiler.name == "gcc":
make("-f", "Make_ar", "spack_gcc")
elif self.compiler.name == "intel-oneapi-compilers":
make("-f", "Make_ar", "spack_oneapi")
else:
raise InstallError(f"Compiler {self.compiler.name} not configured")

def install(self, spec, prefix):
# "Install" in build tree, then copy over
with working_dir("src"):
make("-f", "Make_ar", "install")
# Check for expected files, since errors from make aren't caught reliably.
expected_executables = [
"amsua_nogaps.exe",
"amsub_mhs_nogaps.exe",
"aqua_nogaps.exe",
"atms_nogaps.exe",
"atovin.exe",
"cris_nogaps.exe",
"geo_asr_nogaps.exe",
"geo_csr_nogaps.exe",
"gnss_gb_nogaps.exe",
"gps_nogaps.exe",
"iasi_nogaps.exe",
"mwi_nogaps.exe",
"omps_nogaps.exe",
"radiance_prep.exe",
"ssmis_nogaps.exe",
"ssmis_uas_nogaps.exe",
]
for exe in expected_executables:
p = Path(join_path(self.stage.source_path, "bin", exe))
if not p.exists():
raise InstallError(f"Expected executable {exe} not found.")
# Copy relevant directories over to final location
for subdir in ['bin', 'etc', 'lib', 'mod']:
copy_tree(join_path(self.stage.source_path, subdir), join_path(prefix, subdir))

def check(self):
with working_dir("src/script"):
res = subprocess.run("./run_all_test.sh")
assert res.returncode == 0
#test_script = which(join_path(self.stage.source_path, "src/script/run_all_test.sh"))
#test_script()
Comment on lines +94 to +95

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#test_script = which(join_path(self.stage.source_path, "src/script/run_all_test.sh"))
#test_script()

Remove this when updating the hash for 0.1.0 and the comment above the hash

Loading