JCSDA / spack-stack

Creative Commons Zero v1.0 Universal
21 stars 41 forks source link

Add NEPTUNE standalone virtual package and template, add Atlantis site config #1103

Closed climbfuji closed 1 month ago

climbfuji commented 1 month ago

Summary

  1. Add spack-ext/repos/spack-stack/packages/neptune-env virtual package for standalone neptune (no JEDI)
  2. Update spack-ext/repos/spack-stack/packages/jedi-neptune-env/package.py to avoid code duplication
  3. Add configs/templates/neptune-dev

Testing

Applications affected

NEPTUNE standalone

Systems affected

None

Dependencies

None

Issue(s) addressed

Resolves https://github.com/JCSDA/spack-stack/issues/1102

Checklist

climbfuji commented 1 month ago

@areinecke Here is a PR for a minimal NEPTUNE standalone env in case you want to give this a try before I get to testing it with NEPTUNE.

climbfuji commented 1 month ago

@areinecke @sking112 @fcvdb I created a test spack-stack install on Nautilus with Intel based on the neptune-env template (standalone NEPTUNE) in this PR. Here is how to use it:

umask 0022
module purge
module use /p/work1/heinzell/spack-stack-neptune-mini-env/envs/neptune-env-intel-2021.5.0/install/modulefiles/Core
module load stack-intel/2021.5.0
module load stack-openmpi/4.1.6
module load stack-python/3.10.13
module load neptune-env/1.4.0

This works (for building) with the head of neptune_atmos when making the following code changes:

$ git diff
diff --git a/Makefile b/Makefile
index d465943ee..059523494 100644
--- a/Makefile
+++ b/Makefile
@@ -106,7 +106,7 @@ M4DIR  := $(SRC_DIR)/m4
 # examining the build system makefile code.

 # t = true, f = false
-export SPACK_STACK_INSTALL ?= f
+export SPACK_STACK_INSTALL ?= t
 export DEBUG               ?= f
 export FOR_GPU             ?= f
 export NUOPC_BUILD         ?= f
diff --git a/cfg/config.general_settings b/cfg/config.general_settings
index 24dc31bad..a54215e12 100644
--- a/cfg/config.general_settings
+++ b/cfg/config.general_settings
@@ -213,11 +213,12 @@ ifeq ($(PHYSICS),t)
     INCLUDE  += -I$(NETCDFHOME)/include
     EXTLIBS  += -L$(NETCDFHOME)/lib -lnetcdf -lnetcdff
   else
-    EXTLIBS  += -L$(w3nco_ROOT)/lib -L$(bacio_ROOT)/lib -L$(sp_ROOT)/lib -L$(sp_ROOT)/lib64
+    # DO WE NEED LIB AND LIB64
+    EXTLIBS  += -L$(w3nco_ROOT)/lib -L$(bacio_ROOT)/lib -L$(ip_ROOT)/lib -L$(ip_ROOT)/lib64
     ifneq ($(SINGLE),t)
-      EXTLIBS  += -lw3nco_d -lbacio_8 -lsp_d
+      EXTLIBS  += -lw3nco_d -lbacio_8 -lip_d
     else
-      EXTLIBS  += -lw3nco_4 -lbacio_4 -lsp_4
+      EXTLIBS  += -lw3nco_4 -lbacio_4 -lip_4
     endif

     INCLUDE  += -I$(netcdf_c_ROOT)/include -I$(netcdf_fortran_ROOT)/include

Please check if the environment contains everything you expect and let me know. Thanks!

climbfuji commented 1 month ago

@areinecke I think we should merge this PR (NEPTUNE standalone env without xnrl) and add xnrl as a follow-up PR - we already have an issue to cover that. For the moment, we/I can install xnrl in a separate location and provide instructions on loading it into the environment after loading the spack-stack modules. Does that sound ok?