Error to compile UFS model with Short-Range Weather Application

Dear UFS's support team,

I'm a new user of UFS model. Currently, I have been compiling the UFS model with Short-Range Weather Application. However, at the make stage, I got the error like that:

[  4%] Performing configure step for 'UFS_UTILS'
[  8%] Performing configure step for 'ufs_weather_model'
[ 12%] Performing configure step for 'EMC_post'
CMake Error at CMakeLists.txt:22 (message):
  NONE is not a valid application.

  Valid Applications are:
  ATM;ATMAERO;ATMW;S2S;S2SW;NG-GODAS;NG-GODAS-NEMSDATM


-- Configuring incomplete, errors occurred!
See also "/work/users/weather/user/manh/ufs-srweather-app/build/src/ufs_weather_model/src/ufs_weather_model-build/CMakeFiles/CMakeOutput.log".
make[2]: *** [src/ufs_weather_model/src/ufs_weather_model-stamp/ufs_weather_model-configure] Error 1
make[1]: *** [src/CMakeFiles/ufs_weather_model.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
CMake Error at /work/users/weather/user/manh/WRF-CMAQ/LIBRARIES/cmake/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:165 (message):
  Could NOT find NetCDF (missing: NetCDF_INCLUDE_DIRS)
Call Stack (most recent call first):
  /work/users/weather/user/manh/WRF-CMAQ/LIBRARIES/cmake/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:458 (_FPHSA_FAILURE_MESSAGE)
  CMakeModules/Modules/FindNetCDF.cmake:291 (find_package_handle_standard_args)
  CMakeLists.txt:52 (find_package)


-- Configuring incomplete, errors occurred!
See also "/work/users/weather/user/manh/ufs-srweather-app/build/src/UFS_UTILS/src/UFS_UTILS-build/CMakeFiles/CMakeOutput.log".
make[2]: *** [src/UFS_UTILS/src/UFS_UTILS-stamp/UFS_UTILS-configure] Error 1
make[1]: *** [src/CMakeFiles/UFS_UTILS.dir/all] Error 2
CMake Error at CMakeLists.txt:34 (find_package):
  By not providing "FindNetCDF.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "NetCDF", but
  CMake did not find one.

  Could not find a package configuration file provided by "NetCDF" with any
  of the following names:

    NetCDFConfig.cmake
    netcdf-config.cmake

  Add the installation prefix of "NetCDF" to CMAKE_PREFIX_PATH or set
  "NetCDF_DIR" to a directory containing one of the above files.  If "NetCDF"
  provides a separate development package or SDK, be sure it has been
  installed.


-- Configuring incomplete, errors occurred!
See also "/work/users/weather/user/manh/ufs-srweather-app/build/src/EMC_post/src/EMC_post-build/CMakeFiles/CMakeOutput.log".
make[2]: *** [src/EMC_post/src/EMC_post-stamp/EMC_post-configure] Error 1
make[1]: *** [src/CMakeFiles/EMC_post.dir/all] Error 2
make: *** [all] Error 2

This is my result after running the cmake stage:

 UFS Short Range Weather App Configuration Summary
===================================================

# General
---------
SRWA Version:        1.0.0
Configured On:        Sat Jul  3 11:31:02 +07 2021
Host System:        x86_64-Linux-3.10.0-957.27.2.el7.x86_64
Build Directory:     /work/users/weather/user/manh/ufs-srweather-app/build
Install Prefix:         /work/users/weather/user/manh/ufs-srweather-app

# Compiling Options
-------------------
C Compiler:        /usr/bin/cc
CFLAGS:             
CPPFLAGS:         
C++ Compiler:        /usr/bin/c++
Fortran Compiler:    /usr/bin/gfortran


-- Configuring done
-- Generating done
-- Build files have been written to: /work/users/weather/user/manh/ufs-srweather-app/build
 

Please help me to solve this problem!

Any suggestions will be appreciated.

Thanks all,

Bests,

Manh,

 

Hi, Manh,

It seems that the libraries (e.g. NetCDF) needed for compiling model are missing. You need to set/install the libraries to compile the model.

Thanks,

Linlin

Hi Linlin,

Thank you for your reply.

I have set my path to netcdf libraries, however, it got another error:

-- Found NetCDF: /work/apps/intel_2016/netcdf/4.3.3.1/include (found version "4.3.3.1") found components: C Fortran 
-- FindNetCDF defines targets:
--   - NetCDF_VERSION [4.3.3.1]
--   - NetCDF_PARALLEL [FALSE]
--   - NetCDF_C_CONFIG_EXECUTABLE [/work/apps/intel_2016/netcdf/4.3.3.1/bin/nc-config]
--   - NetCDF::NetCDF_C [SHARED] [Root: /work/apps/intel_2016/netcdf/4.3.3.1] Lib: /work/apps/intel_2016/netcdf/4.3.3.1/lib/libnetcdf.so 
--   - NetCDF_Fortran_CONFIG_EXECUTABLE [/work/apps/intel_2016/netcdf/4.3.3.1/bin/nf-config]
--   - NetCDF::NetCDF_Fortran [SHARED] [Root: /work/apps/intel_2016/netcdf/4.3.3.1] Lib: /work/apps/intel_2016/netcdf/4.3.3.1/lib/libnetcdff.so 
-- Detecting Fortran compiler ABI info - done
-- Check for working Fortran compiler: /work/apps/intel/mvapich2/2.3.2/bin/mpif90 - skipped
-- Checking whether /work/apps/intel/mvapich2/2.3.2/bin/mpif90 supports Fortran 90
-- Found MPI_C: /work/apps/intel/mvapich2/2.3.2/lib/libmpi.so (found version "3.1") 
-- Checking whether /work/apps/intel/mvapich2/2.3.2/bin/mpif90 supports Fortran 90 - yes
CMake Error at CMakeLists.txt:22 (message):
  NONE is not a valid application.

  Valid Applications are:
  ATM;ATMAERO;ATMW;S2S;S2SW;NG-GODAS;NG-GODAS-NEMSDATM


-- Configuring incomplete, errors occurred!
See also "/work/users/weather/user/manh/Model/ufs-srweather-app/build/src/ufs_weather_model/src/ufs_weather_model-build/CMakeFiles/CMakeOutput.log".
make[2]: *** [src/ufs_weather_model/src/ufs_weather_model-stamp/ufs_weather_model-configure] Error 1
make[1]: *** [src/CMakeFiles/ufs_weather_model.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
-- Found MPI_Fortran: /work/apps/intel/mvapich2/2.3.2/lib/libmpifort.so (found version "3.1") 
-- Found MPI: TRUE (found version "3.1")  
CMake Error at CMakeLists.txt:34 (find_package):
  By not providing "FindNetCDF.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "NetCDF", but
  CMake did not find one.

  Could not find a package configuration file provided by "NetCDF" with any
  of the following names:

    NetCDFConfig.cmake
    netcdf-config.cmake

  Add the installation prefix of "NetCDF" to CMAKE_PREFIX_PATH or set
  "NetCDF_DIR" to a directory containing one of the above files.  If "NetCDF"
  provides a separate development package or SDK, be sure it has been
  installed.


-- Configuring incomplete, errors occurred!
See also "/work/users/weather/user/manh/Model/ufs-srweather-app/build/src/EMC_post/src/EMC_post-build/CMakeFiles/CMakeOutput.log".
make[2]: *** [src/EMC_post/src/EMC_post-stamp/EMC_post-configure] Error 1
make[1]: *** [src/CMakeFiles/EMC_post.dir/all] Error 2
-- Found MPI_Fortran: /work/apps/intel/mvapich2/2.3.2/lib/libmpifort.so (found version "3.1") 
-- Found MPI: TRUE (found version "3.1") found components: C Fortran 
CMake Warning at CMakeModules/Modules/FindESMF.cmake:26 (message):
  ESMFMKFILE not defined.  This is the path to esmf.mk file.  Without this
  filepath, ESMF_FOUND will always be FALSE.
Call Stack (most recent call first):
  CMakeLists.txt:54 (find_package)


-- Found OpenMP_Fortran: -qopenmp (found version "5.0") 
-- Found OpenMP: TRUE (found version "5.0") found components: Fortran 
CMake Error at CMakeLists.txt:61 (find_package):
  By not providing "Findgfsio.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "gfsio", but
  CMake did not find one.

  Could not find a package configuration file provided by "gfsio" with any of
  the following names:

    gfsioConfig.cmake
    gfsio-config.cmake

  Add the installation prefix of "gfsio" to CMAKE_PREFIX_PATH or set
  "gfsio_DIR" to a directory containing one of the above files.  If "gfsio"
  provides a separate development package or SDK, be sure it has been
  installed.


-- Configuring incomplete, errors occurred!
See also "/work/users/weather/user/manh/Model/ufs-srweather-app/build/src/UFS_UTILS/src/UFS_UTILS-build/CMakeFiles/CMakeOutput.log".
make[2]: *** [src/UFS_UTILS/src/UFS_UTILS-stamp/UFS_UTILS-configure] Error 1
make[1]: *** [src/CMakeFiles/UFS_UTILS.dir/all] Error 2
make: *** [all] Error 2

Can you kindly give me some suggestions?

Thank you very much!

Bests,

Manh,

Hi Manh,

Can you let me know what hash of the ufs-srweather-app you are using? Also what machine are you running on?

Thanks,

-Mike

 

Permalink

In reply to by kavulich

Hi Mike,

Thank you for your reply.

Currently, I'm using the ufs-v1.0.0 and my HPC system is Linux CentOs7.

Besides, I practiced the compiling process based on the guideline in this site https://ufs-srweather-app.readthedocs.io/en/ufs-v1.0.0/SRWAppOverview.html

Thanks,

Manh,

Your cmake build log shows that you are trying to build a newer version of the ufs-weather-model than the one the app release branch is designed for. Have you made any modifications to the Externals.cfg file or checked out a different hash of the ufs-srweather-app? If you are unsure, can you send the output of the `git status` command from the ufs-srweather-app directory?

Permalink

In reply to by kavulich

Hi David,

Thank you for your reply,

Here is my result after typing the git status command at theufs-srweather-app directory:

[weather@igplogin ufs-srweather-app]$ git status
# Not currently on any branch.
# Untracked files:
#   (use "git add <file>..." to include in what will be committed)
#
#    build/
#    cmake
#    regional_workflow/
#    src/EMC_post/
#    src/UFS_UTILS/
#    src/ufs_weather_model/
nothing added to commit but untracked files present (use "git add" to track)

Manh,

Can you try checking out a fresh version of the ufs-srweather-app and building again? This sort of error shouldn't occur if you are working with the correct set of hashes as should be found in the release tag (git clone -b ufs-v1.0.0 https://github.com/ufs-community/ufs-srweather-app.git)

Please let me know what your results are after re-trying with a fresh clone. We will have to see if there are some unknown settings on your machine that need to be accounted for.

 - Mike

PS As a side note, while checking your issue I did notice there is a typo later on in the build instructions (`make dir` should be `mkdir build`).

 

Hi Mike,

Thank you for your reply.

I've redownloaded and compiled this model, unfortunately it still had the error which I mentioned before.

Can you kindly give me another suggestions?

Many thanks,

Bests,

Manh

Hi Manh, sorry it is taking so long to get back to you, this is a very puzzling error. Did you save the cmake and make logs from your most recent clean install? If so can you attach them here?

Hi David,

I have recompiled this model in Ubuntu but it still failed. Pleas help me to address it!

The log file of compiling process is attached in the below.

Thank you very much!

 

 

Attach Files

Hi David,

Thank you for your help. I got the problem when I built the NCEPlib so it made the error for compiling UFS model.

After I rebuilt the NCEPlib, I did compile this model successfully.

Thank you again.