-
Notifications
You must be signed in to change notification settings - Fork 58
Update NRL adp-preprocessors, add sdp-preprocessors #2060
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
climbfuji
wants to merge
14
commits into
JCSDA:develop
Choose a base branch
from
climbfuji:feature/sdp
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
41cb868
Update repos/spack_stack/spack_repo/spack_stack/packages/adp_preproce…
climbfuji 1b57108
Add repos/spack_stack/spack_repo/spack_stack/packages/sdp_preprocesso…
climbfuji 12cfb0e
Add new package sdp-preprocessors to jedi_neptune_env / neptune-dev
climbfuji c80d89c
Bug fix in util/nrl/batch_install.sh: turn off ADP and SDP only on Pa…
climbfuji e1a1c72
Merge branch 'develop' of https://github.com/jcsda/spack-stack into f…
climbfuji 4ce88a0
Merge branch 'develop' of https://github.com/jcsda/spack-stack into f…
climbfuji e9f20ac
Update repos/spack_stack/spack_repo/spack_stack/packages/sdp_preproce…
climbfuji 5d795fc
Turn off variant sdp in GitHub actions
climbfuji 9a5322a
Merge branch 'develop' of https://github.com/jcsda/spack-stack into f…
climbfuji bfc33dc
[skip ci] WIP sdp-preprocessors
climbfuji babac4a
[skip ci] Update repos/spack_stack/spack_repo/spack_stack/packages/sd…
climbfuji 915ddc9
[skip ci] Update repos/spack_stack/spack_repo/spack_stack/packages/sd…
climbfuji 46f0d32
Trigger CI
climbfuji 470694f
Merge branch 'develop' of https://github.com/jcsda/spack-stack into f…
climbfuji File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
95 changes: 95 additions & 0 deletions
95
repos/spack_stack/spack_repo/spack_stack/packages/sdp_preprocessors/package.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Remove this when updating the hash for 0.1.0 and the comment above the hash |
||||||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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.