Skip to content
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

find_dependency(w3nco) broken in new EPIC Cheyenne GNU installation #451

Open
christopherwharrop-noaa opened this issue May 19, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@christopherwharrop-noaa

When building GSI on Cheyenne using the newer hpc-stack located under /glade/work/epicufsrt/GMTB/tools/... the Intel build succeeds, but the GNU build fails with a find_dependency(w3nco) error initiated when loading nemsio via find_package(nemsio). For some reason, it appears that the Intel build can find the necessary config files to resolve nemsio's dependency on w3nco, but the GNU build cannot:

harrop@cheyenne4:~/GSI> COMPILER=gnu ush/build.sh

Currently Loaded Modules:
  1) cmake/3.22.0   3) ncarenv/1.3   5) mpt/2.22              7) hpc/1.2.0        9) hpc-mpt/2.22  11) netcdf/4.7.4  13) bacio/2.4.1  15) ip/3.3.3     17) sfcio/1.4.1  19) nemsio/2.5.2  21) ncio/1.0.0  23) gsi_common       25) gsi_cheyenne.gnu
  2) python/3.7.9   4) gnu/10.1.0    6) ncarcompilers/0.5.0   8) hpc-gnu/10.1.0  10) hdf5/1.10.8   12) bufr/11.5.0   14) sp/2.3.3     16) sigio/2.3.2  18) w3emc/2.9.2  20) wrf_io/1.2.0  22) crtm/2.3.0  24) prod_util/1.2.2

 

+ cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/glade/u/home/harrop/GSI/install -DGSI_MODE=Regional -DENKF_MODE=GFS -DBUILD_UTIL_ALL=ON -DBUILD_REG_TESTING=ON -DCONTROLPATH= /glade/u/home/harrop/GSI
-- The C compiler identification is GNU 10.1.0
-- The Fortran compiler identification is GNU 10.1.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /glade/u/apps/ch/opt/ncarcompilers/0.5.0/gnu/10.1.0/mpi/mpicc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting Fortran compiler ABI info
-- Detecting Fortran compiler ABI info - done
-- Check for working Fortran compiler: /glade/u/apps/ch/opt/ncarcompilers/0.5.0/gnu/10.1.0/mpi/mpif90 - skipped
-- OPENMP ................. OFF
-- ENABLE_MKL ............. ON
-- BUILD_NCDIAG ........... ON
-- BUILD_GSDCLOUD ......... OFF
-- BUILD_GSI .............. ON
-- BUILD_ENKF ............. ON
-- BUILD_UTIL ............. ON
-- BUILD_REG_TESTING ...... ON
-- Building GSI NetCDF diagnostic library
-- Found MPI_C: /glade/u/apps/ch/opt/ncarcompilers/0.5.0/gnu/10.1.0/mpi/mpicc (found version "3.1") 
-- Found MPI_Fortran: /glade/u/apps/ch/opt/ncarcompilers/0.5.0/gnu/10.1.0/mpi/mpif90 (found version "3.1") 
-- Found MPI: TRUE (found version "3.1")  
-- Found NetCDF: /glade/work/epicufsrt/GMTB/tools/gnu/10.1.0/hpc-stack-v1.2.0/gnu-10.1.0/mpt-2.22/netcdf/4.7.4/include (found version "4.7.4") found components: Fortran 
-- FindNetCDF defines targets:
--   - NetCDF_VERSION [4.7.4]
--   - NetCDF_PARALLEL [TRUE]
--   - NetCDF_C_CONFIG_EXECUTABLE [/glade/work/epicufsrt/GMTB/tools/gnu/10.1.0/hpc-stack-v1.2.0/gnu-10.1.0/mpt-2.22/netcdf/4.7.4/bin/nc-config]
--   - NetCDF::NetCDF_C [STATIC] [Root: /glade/work/epicufsrt/GMTB/tools/gnu/10.1.0/hpc-stack-v1.2.0/gnu-10.1.0/mpt-2.22/netcdf/4.7.4] Lib: /glade/work/epicufsrt/GMTB/tools/gnu/10.1.0/hpc-stack-v1.2.0/gnu-10.1.0/mpt-2.22/netcdf/4.7.4/lib/libnetcdf.a 
--   - NetCDF_Fortran_CONFIG_EXECUTABLE [/glade/work/epicufsrt/GMTB/tools/gnu/10.1.0/hpc-stack-v1.2.0/gnu-10.1.0/mpt-2.22/netcdf/4.7.4/bin/nf-config]
--   - NetCDF::NetCDF_Fortran [STATIC] [Root: /glade/work/epicufsrt/GMTB/tools/gnu/10.1.0/hpc-stack-v1.2.0/gnu-10.1.0/mpt-2.22/netcdf/4.7.4] Lib: /glade/work/epicufsrt/GMTB/tools/gnu/10.1.0/hpc-stack-v1.2.0/gnu-10.1.0/mpt-2.22/netcdf/4.7.4/lib/libnetcdff.a 
-- ENABLE_NCDIAG_SERIAL ... ON
-- Building GSI
-- GSI: OPENMP ................. OFF
-- GSI: ENABLE_MKL ............. ON
-- GSI: USE_GSDCLOUD ........... OFF
-- GSI: GSI_MODE ............... Regional
-- Found MKL: /glade/u/apps/opt/intel/2022.1/mkl/latest/lib/intel64/libmkl_intel_lp64.so;/glade/u/apps/opt/intel/2022.1/mkl/latest/lib/intel64/libmkl_sequential.so;/glade/u/apps/opt/intel/2022.1/mkl/latest/lib/intel64/libmkl_core.so  
-- FindNetCDF defines targets:
--   - NetCDF_VERSION [4.7.4]
--   - NetCDF_PARALLEL [TRUE]
--   - NetCDF_C_CONFIG_EXECUTABLE [/glade/work/epicufsrt/GMTB/tools/gnu/10.1.0/hpc-stack-v1.2.0/gnu-10.1.0/mpt-2.22/netcdf/4.7.4/bin/nc-config]
--   - NetCDF::NetCDF_C [STATIC] [Root: /glade/work/epicufsrt/GMTB/tools/gnu/10.1.0/hpc-stack-v1.2.0/gnu-10.1.0/mpt-2.22/netcdf/4.7.4] Lib: /glade/work/epicufsrt/GMTB/tools/gnu/10.1.0/hpc-stack-v1.2.0/gnu-10.1.0/mpt-2.22/netcdf/4.7.4/lib/libnetcdf.a 
--   - NetCDF_Fortran_CONFIG_EXECUTABLE [/glade/work/epicufsrt/GMTB/tools/gnu/10.1.0/hpc-stack-v1.2.0/gnu-10.1.0/mpt-2.22/netcdf/4.7.4/bin/nf-config]
--   - NetCDF::NetCDF_Fortran [STATIC] [Root: /glade/work/epicufsrt/GMTB/tools/gnu/10.1.0/hpc-stack-v1.2.0/gnu-10.1.0/mpt-2.22/netcdf/4.7.4] Lib: /glade/work/epicufsrt/GMTB/tools/gnu/10.1.0/hpc-stack-v1.2.0/gnu-10.1.0/mpt-2.22/netcdf/4.7.4/lib/libnetcdff.a 
-- Found bacio: /glade/work/epicufsrt/GMTB/tools/gnu/10.1.0/hpc-stack-v1.2.0/gnu-10.1.0/bacio/2.4.1/lib/libbacio_4.a (found version "2.4.0")
-- Found sigio: /glade/work/epicufsrt/GMTB/tools/gnu/10.1.0/hpc-stack-v1.2.0/gnu-10.1.0/sigio/2.3.2/lib/libsigio.a (found version "2.3.0")
-- Found sfcio: /glade/work/epicufsrt/GMTB/tools/gnu/10.1.0/hpc-stack-v1.2.0/gnu-10.1.0/sfcio/1.4.1/lib/libsfcio.a (found version "1.4.0")
-- Found bacio: /glade/work/epicufsrt/GMTB/tools/gnu/10.1.0/hpc-stack-v1.2.0/gnu-10.1.0/bacio/2.4.1/lib/libbacio_4.a (found version "2.4.0")
CMake Error at /glade/u/apps/ch/opt/cmake/3.22.0/share/cmake-3.22/Modules/CMakeFindDependencyMacro.cmake:47 (find_package):
  Could not find a package configuration file provided by "w3nco" with any of
  the following names:

    w3ncoConfig.cmake
    w3nco-config.cmake

  Add the installation prefix of "w3nco" to CMAKE_PREFIX_PATH or set
  "w3nco_DIR" to a directory containing one of the above files.  If "w3nco"
  provides a separate development package or SDK, be sure it has been
  installed.
Call Stack (most recent call first):
  /glade/work/epicufsrt/GMTB/tools/gnu/10.1.0/hpc-stack-v1.2.0/gnu-10.1.0/mpt-2.22/nemsio/2.5.2/lib/cmake/nemsio/nemsio-config.cmake:41 (find_dependency)
  src/gsi/CMakeLists.txt:68 (find_package)


-- Configuring incomplete, errors occurred!
See also "/glade/u/home/harrop/GSI/build/CMakeFiles/CMakeOutput.log".
harrop@cheyenne4:~/GSI>

The bug can be worked around by explicitly loading the w3nco module before loading the gsi_common module. For example:

-- Preload w3nco to work around nemsio "find_dependency(w3nco)" hpc-stack bug
load("w3nco/2.4.1")

load("gsi_common")

However, that hack is undesirable. It is also undesirable to load w3nco in gsi_common because the GSI code itself does not use w3nco and w3nco is instead a transitive dependency for nemsio.

To Reproduce

git clone -b feature/update-cheyenne-hpc-stack https://github.com/christopherwharrop-noaa/GSI.git
cd GSI
sed -i '/w3nco/d' modulefiles/gsi_cheyenne.gnu.lua
bash -c "COMPILER=gnu ush/build.sh"

Expected behavior
The expected behavior is a successful build with the GNU compiler.

System:
Cheyenne

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant