-
Notifications
You must be signed in to change notification settings - Fork 151
Open
Labels
Description
Issue
Building with the conda environment npl-2025a on Derecho leads to an error.
Importance
A fix would allow WRF-Hydro to build in a Jupyterhub Notebook on Derecho. There is no immediate need for a fix, just wanted to put out information on it.
Error
Note: build with bugfix/npl-build branch
$ cmake -B build
-- The Fortran compiler identification is GNU 12.4.0
-- The C compiler identification is GNU 12.4.0
-- Detecting Fortran compiler ABI info
-- Detecting Fortran compiler ABI info - done
-- Check for working Fortran compiler: /glade/u/apps/casper/24.12/spack/opt/spack/gcc/12.4.0/5b5c/bin/gfortran - skipped
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /glade/u/apps/casper/24.12/spack/opt/spack/gcc/12.4.0/5b5c/bin/gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Found MPI_C: /glade/u/apps/opt/conda/envs/npl-2025a/lib/libmpi.so (found version "4.1")
-- Found MPI_Fortran: /glade/u/apps/opt/conda/envs/npl-2025a/lib/libmpifort.so (found version "4.1")
-- Found MPI: TRUE (found version "4.1")
-- Failed to find NetCDF interface for F77
-- Failed to find NetCDF interface for F90
CMake Error at /glade/u/apps/derecho/24.12/spack/opt/spack/cmake/3.26.6/gcc/12.4.0/okco/share/cmake-3.26/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find NetCDF (missing: NETCDF_INCLUDES NetCDF_has_interfaces)
Call Stack (most recent call first):
/glade/u/apps/derecho/24.12/spack/opt/spack/cmake/3.26.6/gcc/12.4.0/okco/share/cmake-3.26/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
src/cmake-modules/FindNetCDF.cmake:89 (find_package_handle_standard_args)
CMakeLists.txt:53 (find_package)
-- Configuring incomplete, errors occurred!
Simply adding the path to the NetCDF install gets further but there are still issues
$ nc-config --prefix
/glade/u/apps/opt/conda/envs/npl-2025a
$ NETCDF=$(nc-config --prefix) cmake -B build
-- The Fortran compiler identification is GNU 12.4.0
-- The C compiler identification is GNU 12.4.0
-- Check for working Fortran compiler: /glade/u/apps/casper/24.12/spack/opt/spack/gcc/12.4.0/5b5c/bin/gfortran - skipped
-- Check for working C compiler: /glade/u/apps/casper/24.12/spack/opt/spack/gcc/12.4.0/5b5c/bin/gcc - skipped
-- Found MPI_C: /glade/u/apps/opt/conda/envs/npl-2025a/lib/libmpi.so (found version "4.1")
-- Found MPI_Fortran: /glade/u/apps/opt/conda/envs/npl-2025a/lib/libmpifort.so (found version "4.1")
-- Found MPI: TRUE (found version "4.1")
-- Found NetCDF: /glade/u/apps/opt/conda/envs/npl-2025a/lib/libnetcdff.so;/glade/u/apps/opt/conda/envs/npl-2025a/lib/libnetcdf.so;-L/glade/u/apps/opt/conda/envs
/npl-2025a/lib -lnetcdf
FindNetCDF.cmake: first NOT TARGET netCDF::netcdf
FindNetCDF.cmake: second NOT TARGET netCDF::netcdf
-- NetCDF Include Dir(s): /glade/u/apps/opt/conda/envs/npl-2025a/include /glade/u/apps/opt/conda/envs/npl-2025a/include
NETCDF_LIBRARIES_C = /glade/u/apps/opt/conda/envs/npl-2025a/lib/libnetcdf.so
NETCDF_LIBRARIES_CXX =
NETCDF_LIBRARIES_F77 = /glade/u/apps/opt/conda/envs/npl-2025a/lib/libnetcdff.so
NETCDF_LIBRARIES_F90 = /glade/u/apps/opt/conda/envs/npl-2025a/lib/libnetcdff.so
NETCDF_INCLUDES = /glade/u/apps/opt/conda/envs/npl-2025a/include
INTERFACE_INCLUDE_DIRECTORIES =
-- Setting LSM to: NoahMP
=============================================================
-- Start of WRF-Hydro Env VARIABLES
WRF_HYDRO = 1
HYDRO_D = 0
WRF_HYDRO_RAPID = 0
SPATIAL_SOIL = 0
WRFIO_NCD_LARGE_FILE_SUPPORT = 1
NCEP_WCOSS = 0
NWM_META = 0
WRF_HYDRO_NUDGING = 0
OUTPUT_CHAN_CONN = 0
PRECIP_DOUBLE = 0
WRF_HYDRO_NUOPC = 0
WRF_HYDRO_CREATE_EXE_SYMLINK = ON
=============================================================
-- Using gfortran
-- CMAKE_Fortran_COMPILER full path: /glade/u/apps/casper/24.12/spack/opt/spack/gcc/12.4.0/5b5c/bin/gfortran
-- Building NoahMP LSM
-- Configuring done (3.0s)
CMake Error in src/CMakeLists.txt:
Target "hydro_driver" contains relative path in its
INTERFACE_INCLUDE_DIRECTORIES:
"NETCDF_MODULES-NOTFOUND"
CMake Error in src/IO/CMakeLists.txt:
Imported target "netCDF::netcdff" includes non-existent path
"NETCDF_MODULES-NOTFOUND"
in its INTERFACE_INCLUDE_DIRECTORIES. Possible reasons include:
* The path was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and references files it does not
CMake Error in src/OrchestratorLayer/CMakeLists.txt:
Target "hydro_netcdf_layer" contains relative path in its
INTERFACE_INCLUDE_DIRECTORIES:
"NETCDF_MODULES-NOTFOUND"
CMake Error in src/HYDRO_drv/CMakeLists.txt:
Imported target "netCDF::netcdff" includes non-existent path
"NETCDF_MODULES-NOTFOUND"
in its INTERFACE_INCLUDE_DIRECTORIES. Possible reasons include:
* The path was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and references files it does not
provide.
-- Generating done (0.8s)
CMake Generate step failed. Build files cannot be regenerated correctly.