Spack-stack is a framework for installing software libraries to
support NOAA's Unified Forecast System (UFS) applications and the Joint
Effort for Data assimilation Integration (JEDI) coupled to several Earth
system prediction models (MPAS, NEPTUNE, UM, FV3, GEOS, UFS).
Spack-stack provides a practical framework for setting up and
managing software libraries that support the Unified Forecast System
(UFS) and Joint Effort for Data assimilation Integration (JEDI)
projects, along with several other Earth system prediction models, such
as the Model for Prediction Across Scales (MPAS), the Navy Environmental
Prediction System Utilizing a Nonhydrostatic Engine (NEPTUNE), the
Unified Model (UM), and the Goddard Earth Observing System (GEOS). This
project results from collaboration among the Joint Center for Satellite
Data Assimilation (JCSDA), the National Oceanic and Atmospheric
Administration’s (NOAA’s) Environmental Modeling Center (EMC) and Earth
Prediction Innovation Center (EPIC), and the U.S. Naval Research
Laboratory (NRL). Spack-stack utilizes the Spack package manager,
originally developed at Lawrence Livermore National Laboratory to cater
to scientific high-performance computing (HPC) workflows.
SPACK-STACK
1.5.0 > That started changing in 2021, when JCSDA and NOAA EMC
began exploring Spack as an option for creating a single software stack
that could be used for both the JEDI DA software environment and the
Unified Forecast System (UFS) ecosystem.
Environment module support Note: lmod is available in 22.04, but is out of date: https://github.com/JCSDA/spack-stack/issues/593 apt install -y environment-modules
# If not using an existing site configuration, you may wish to modify config files and/or populate them using commands # such as 'spack external find' and 'spack compiler find'. # See https://spack-tutorial.readthedocs.io/en/latest/tutorial_configuration.html
Error: > Error: eigen-3.4.0-t4jxg3j727pxxsr75zstl2eblmkzapfz:
timeout: The read operation timed out >> rerun: $ spack
install
==> Installing krb5-1.20.1-muktx57itqz6x2z74afwncpub2higpei
msgfmt: error while opening "en_US.mo" for writing: Permission denied
msgfmt: error while opening "de.mo" for writing: Permission denied >
No install git-lfs
Error: git-lfs-3.3.0-6ilwlfqmm7ud5crbugmcskju5gtkgk4j: Package was
not installed > $ micromamba activate git-lfs >
$ micromamba install git-lfs
Remark: Git Large File Storage (LFS) replaces large files such as
audio samples, videos, datasets, and graphics with text pointers inside
Git, while storing the file contents on a remote server like GitHub.com
or GitHub Enterprise.
MPAS-JEDI uses cmake to automatically download the code from various
github repositories, listed in CMakeLists.txt under ~code. Now type the
command below under the build directory:
...... -- Configuring done -- Generating done -- Build files have been written to: /home/wpsze/mpas_bundle_v2/build
After it completes, you will see the actual source code of
various reporitories (e.g., oops, saber, ufo, ioda, crtm, mpas-jedi, and
MPAS) is now under the code directory. Meanwhile,
Makefile files to build executables are generated under the
build directory. Now it is ready to compile MPAS-JEDI under
'build' using the standard make. However, it is NOT recommended to
compile the code on the login node at the same time.
1 2 3 4
$ make -j14
....... [100%]
This requests xx min walltime of a login node with 14 cores.
{:.info}
Once we reach 100% of the compilation, we can check mpas-jedi related
executables:
To determine if a test passes or fails, a comparison of the test
log and reference file is done internally taking as reference a
tolerance value. This tolerance is specified via YAML file. These
files can be found under mpas-jedi/test/testoutput in
the build folder.
Converting
NCEP BUFR observation into IODA-HDF5 format
1 2 3
$ cd mpas_jedi_tutorial $ git clone https://github.com/NCAR/obs2ioda $ cd obs2ioda/obs2ioda-v2/src/
NCEP BUFR library (https://github.com/NOAA-EMC/NCEPLIBS-bufr) is
required to compile obs2ioda-v2.x. Edit
obs2ioda-v2/src/Makefile to set proper
BUFR_LIB before make. Here we have pre-build BUFR_LIB
on Taiwania-3 and we put the pre-build BUFR_LIB path in Makefile.
# $ cmake -DCMAKE_INSTALL_PREFIX=path1 -DMASTER_TABLE_DIR=path2 .. # path1=./ $ cmake -DCMAKE_INSTALL_PREFIX=./ .. -- Build files have been written to: /home/wpsze/mpas_jedi_tutorial/NCEPLIBS-bufr/build
$ make -j4 ...... [100%] Built target outtest6_8
$ ctest ...... 100% tests passed, 0 tests failed out of 94 Total Test time (real) = 30.62 sec
$ make install ...... -- Installing: /home/wpsze/mpas_jedi_tutorial/NCEPLIBS-bufr/build/bin/debufr
Both path1 and path2 may be full or
relative pathnames on the system, up to a maximum of 90 characters
each.
Installation of the library and utilities will be under
path1. Installation of the master BUFR tables will be
under path2, or under path1 if
-DMASTER_TABLE_DIR=path2 is omitted from the above cmake
command.
If Python interoperability is desired, -DENABLE_PYTHON=ON can also be
added to the above cmake command. However, version 3 of Python must be
installed and available on the system.
NCEP BUFR library (https://github.com/NOAA-EMC/NCEPLIBS-bufr) is
required to compile obs2ioda-v2.x. Edit
obs2ioda-v2/src/Makefile to set proper
BUFR_LIB before make. Here we have pre-build
BUFR_LIB on Taiwania-3 and we put the pre-build BUFR_LIB path in
Makefile. We have to build one as above and put the build BUFR_LIB
path in Makefile.
Default Makefile includes,
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
#-------------- #INTEL compiler #-------------- FC = ifort #BUFR_LIB = -L/glade/u/home/hclin/extlib/intel -lbufr #FFLAGS = -mcmodel medium # needed for intel error message "failed to convert GOTPCREL relocation" BUFR_LIB = -L/glade/campaign/mmm/parc/ivette/pandac/converters/WRFDA_3DVAR_dmpar/var/external/bufr -lbufr FFLAGS = -mcmodel medium # needed for intel error message "failed to convert GOTPCREL relocation" # -g -traceback -debug all -check all
$ cd obs2ioda/obs2ioda-v2/src/ $ make # $ make clean
If the compilation is successful, the executable file
obs2ioda-v2.x will be generated.
Error 1
1 2 3 4 5 6
hsd.f90:306:11:
306 | if ( fexist(ij) == .false. ) then | 1 Error: Logicals at (1) must be compared with .eqv. instead of == make: *** [Makefile:67: hsd.o] Error 1
check, and then replace with "eqv"
1 2 3
$ grep -rin "==" hsd.f90 306: if ( fexist(ij) == .false. ) then ...
to
1 2
$ grep -rin "eqv" hsd.f90 306: if ( fexist(ij) .eqv. .false. ) then
Error 2
1 2 3
/usr/bin/ld: cannot find -lbufr collect2: error: ld returned 1 exit status make: *** [Makefile:46: obs2ioda] Error 1
check,
1 2
NCEPLIBS-bufr/build/include/ is bufr_4 NCEPLIBS-bufr/build/lib/ is libbufr_4.a
Error 3
1
/usr/bin/ld: warning: libnetcdf.so.19, needed by /home/wpsze/spack-stack/envs/jedi_gcc_linux/install/gcc/9.4.0/netcdf-fortran-4.6.0-gwqak4i/lib/libnetcdff.so, may conflict with libnetcdf.so.15
hsd.o: infunction `__ahi_hsd_mod_MOD_hisd_radiance_to_tbb': hsd.f90:(.text+0x19ed): relocation truncated to fit: R_X86_64_PC32 against symbol `__ahi_hsd_mod_MOD_header' defined in .bss section in hsd.o hsd.f90:(.text+0x1a06): relocation truncated to fit: R_X86_64_PC32 against symbol `__ahi_hsd_mod_MOD_header' defined in .bss section in hsd.o hsd.f90:(.text+0x1a1a): relocation truncated to fit: R_X86_64_PC32 against symbol `__ahi_hsd_mod_MOD_header' defined in .bss section in hsd.o hsd.f90:(.text+0x1a50): relocation truncated to fit: R_X86_64_PC32 against symbol `__ahi_hsd_mod_MOD_header' defined in .bss section in hsd.o hsd.f90:(.text+0x1a58): relocation truncated to fit: R_X86_64_PC32 against symbol `__ahi_hsd_mod_MOD_header' defined in .bss section in hsd.o hsd.f90:(.text+0x1a64): relocation truncated to fit: R_X86_64_PC32 against symbol `__ahi_hsd_mod_MOD_header' defined in .bss section in hsd.o hsd.f90:(.text+0x1ad1): relocation truncated to fit: R_X86_64_PC32 against symbol `__ahi_hsd_mod_MOD_header' defined in .bss section in hsd.o hsd.f90:(.text+0x1ad9): relocation truncated to fit: R_X86_64_PC32 against symbol `__ahi_hsd_mod_MOD_header' defined in .bss section in hsd.o hsd.f90:(.text+0x1aea): relocation truncated to fit: R_X86_64_PC32 against symbol `__ahi_hsd_mod_MOD_header' defined in .bss section in hsd.o hsd.o: infunction `__ahi_hsd_mod_MOD_pixlin_to_lonlat': hsd.f90:(.text+0x1eca): relocation truncated to fit: R_X86_64_PC32 against symbol `__ahi_hsd_mod_MOD_header' defined in .bss section in hsd.o hsd.f90:(.text+0x1eed): additional relocation overflows omitted from the output /usr/bin/ld: failed to convert GOTPCREL relocation; relink with --no-relax collect2: error: ld returned 1 exit status make: *** [Makefile:46: obs2ioda] Error 1
JEDI-MPAS is the interface between the generic components of the
Joint Effort for Data assimilation Integration (JEDI) system and the
atmospheric core of the Model for Prediction Across Scales (MPAS). The
JEDI software package is a unified, innovative data assimilation system
for Earth System Prediction. Developed and distributed by UCP’s Joint
Center for Satellite Data Assimilation (JCSDA), JEDI is versatile and
sophisticated enough for a variety of applications, from operational
weather forecasting and atmospheric research on High Performance
Computing (HPC), to learning the fundamentals of data assimilation by
running idealized toy models on your laptop. The atmospheric component
of MPAS is a non-hydrostatic model using an unstructured centroidal
Voronoi mesh with smoothly varying resolution for global or regional
domains. The primary development partners for MPAS are Los Alamos
National Laboratory and the National Center for Atmospheric
Research.
This data set provides example observation files, model backgrounds,
and other input files needed to run a variety of JEDI-MPAS applications,
including the comprehensive suite of unit tests and example activities
that are described in online tutorials. This data set accompanies
JEDI-MPAS, version 1.0.0, released 24 September 20.
Wget shell script - Download all files using Wget, preferred for
Linux.
Specific Issue (cluster)
git-lfs issue Ran patch() for krb5 & error while opening
"en_US.mo" for writing: Permission denied
If copy whole mpas_bundle_v2 (e.g. local PC) that
includes build and code to workstation
or cluster,
if your workstation/cluster has spack-stack (for jedi-mpas)
CMake Error: The current CMakeCache.txt directory /xxx/mpas_bundle_v2_temp/build/CMakeCache.txt is different than the directory /home/wpsze/mpas_bundle_v2/build where CMakeCache.txt was created. This may result in binaries being created in the wrong place. If you are not sure, reedit the CMakeCache.txt CMake Error: The source"/home/wpsze/MPAS/MPAS-MPAS-JEDI/DA-obs2ioda-EM/mpas_bundle_v2_temp/code/CMakeLists.txt" does not match the source"/home/wpsze/mpas_bundle_v2/code/CMakeLists.txt" used to generate cache. Re-run cmake with a different source directory. CMake Error: The current CMakeCache.txt directory /xxx/mpas_bundle_v2_temp/build/_deps/mpas_data-subbuild/CMakeCache.txt is different than the directory /home/wpsze/mpas_bundle_v2/build/_deps/mpas_data-subbuild where CMakeCache.txt was created. This may result in binaries being created in the wrong place. If you are not sure, reedit the CMakeCache.txt
config done
1 2 3
-- Configuring done -- Generating done -- Build files have been written to: /xxx/mpas_bundle_v2_temp/build