CMake Error on ESMF when compilation SRW

Dear all,
I tried to compile UFS SRW and I met this error when it comes to compilation of ESMF:

-- Found MPI_C: /soft/openmpi/4.1.2/bebop-bdw/bin/mpicc (found version "3.1")
-- Found MPI_Fortran: /gpfs/fs1/home/software/openmpi/4.1.2/bebop-bdw/lib/libmpi_usempif08.so (found version "3.1")
-- Found MPI: TRUE (found version "3.1")
-- Found MPI_CXX: /soft/openmpi/4.1.2/bebop-bdw/bin/mpicxx (found version "3.1")
-- Found NetCDF: /lcrc/project/OW_UFS/HPC-Stack/include (found version "4.7.4") found components: Fortran
-- FindNetCDF defines targets:
-- - NetCDF_VERSION [4.7.4]
-- - NetCDF_PARALLEL [TRUE]
-- - NetCDF_C_CONFIG_EXECUTABLE [/lcrc/project/OW_UFS/HPC-Stack/bin/nc-config]
-- - NetCDF::NetCDF_C [SHARED] [Root: /lcrc/project/OW_UFS/HPC-Stack] Lib: /lcrc/project/OW_UFS/HPC-Stack/lib/libnetcdf.so
-- - NetCDF_Fortran_CONFIG_EXECUTABLE [/lcrc/project/OW_UFS/HPC-Stack/bin/nf-config]
-- - NetCDF::NetCDF_Fortran [SHARED] [Root: /lcrc/project/OW_UFS/HPC-Stack] Lib: /lcrc/project/OW_UFS/HPC-Stack/lib/libnetcdff.so
-- Found MPI_Fortran: /gpfs/fs1/home/software/openmpi/4.1.2/bebop-bdw/lib/libmpi_usempif08.so (found version "3.1")
-- Found MPI: TRUE (found version "3.1")
-- Found OpenMP_Fortran: -fopenmp (found version "4.5")
-- Found OpenMP: TRUE (found version "4.5") found components: Fortran
-- Found bacio: /lcrc/project/OW_UFS/HPC-Stack/lib/libbacio_4.a (found version "2.4.0")
-- Found crtm: /lcrc/project/OW_UFS/HPC-Stack/lib/libcrtm.a (found version "2.3.0")
-- Found NetCDF: /lcrc/project/OW_UFS/HPC-Stack/include (found suitable version "4.7.4", minimum required is "4.3.3") found components: C Fortran
-- FindNetCDF defines targets:
-- - NetCDF_VERSION [4.7.4]
-- - NetCDF_PARALLEL [TRUE]
-- - NetCDF_C_CONFIG_EXECUTABLE [/lcrc/project/OW_UFS/HPC-Stack/bin/nc-config]
-- - NetCDF::NetCDF_C [SHARED] [Root: /lcrc/project/OW_UFS/HPC-Stack] Lib: /lcrc/project/OW_UFS/HPC-Stack/lib/libnetcdf.so
-- - NetCDF_Fortran_CONFIG_EXECUTABLE [/lcrc/project/OW_UFS/HPC-Stack/bin/nf-config]
-- - NetCDF::NetCDF_Fortran [SHARED] [Root: /lcrc/project/OW_UFS/HPC-Stack] Lib: /lcrc/project/OW_UFS/HPC-Stack/lib/libnetcdff.so
-- Found ZLIB: /lcrc/project/OW_UFS/HPC-Stack/lib/libz.a (found version "1.2.11")
-- Found MPI: TRUE (found version "3.1") found components: C Fortran
-- Found ESMF library: /lcrc/project/OW_UFS/HPC-Stack/lib/libesmf.a
CMake Error at /gpfs/fs1/software/centos7/spack-latest/opt/spack/linux-centos7-x86_64/gcc-6.5.0/cmake-3.20.3-vedypwm/share/cmake-3.20/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find ESMF: Found unsuitable version "..", but required is at
least "8.0.0" (found , )
Call Stack (most recent call first):
/gpfs/fs1/software/centos7/spack-latest/opt/spack/linux-centos7-x86_64/gcc-6.5.0/cmake-3.20.3-vedypwm/share/cmake-3.20/Modules/FindPackageHandleStandardArgs.cmake:592 (_FPHSA_FAILURE_MESSAGE)
cmake/FindESMF.cmake:125 (find_package_handle_standard_args)
CMakeLists.txt:57 (find_package)

-- Configuring incomplete, errors occurred!
See also "/lcrc/project/OW_UFS/UFS_2.0/ufs-srweather-app/build/src/UFS_UTILS/src/UFS_UTILS-build/CMakeFiles/CMakeOutput.log".
-- Found PNG: /lcrc/project/OW_UFS/HPC-Stack/lib64/libpng.a (found version "1.6.35")
-- Found g2: /lcrc/project/OW_UFS/HPC-Stack/lib64/libg2_4.a (found version "3.4.5")
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[1]: *** Waiting for unfinished jobs....
-- Found g2tmpl: /lcrc/project/OW_UFS/HPC-Stack/lib/libg2tmpl.a (found version "1.10.0")
-- Found bacio: /lcrc/project/OW_UFS/HPC-Stack/lib/libbacio_4.a (found version "2.4.0")
-- Found bacio: /lcrc/project/OW_UFS/HPC-Stack/lib/libbacio_4.a (found version "2.4.0")
-- Found w3emc: /lcrc/project/OW_UFS/HPC-Stack/lib64/libw3emc_4.a (found version "2.9.2")
-- Found MPI: TRUE (found version "3.1") found components: Fortran
-- Found nemsio: /lcrc/project/OW_UFS/HPC-Stack/lib64/libnemsio.a (found version "2.5.4")
-- Found sfcio: /lcrc/project/OW_UFS/HPC-Stack/lib/libsfcio.a (found version "1.4.0")
-- Found sigio: /lcrc/project/OW_UFS/HPC-Stack/lib/libsigio.a (found version "2.3.0")
-- Found OpenMP_Fortran: -fopenmp (found version "4.5")
-- Found sp: /lcrc/project/OW_UFS/HPC-Stack/lib/libsp_4.a (found version "2.3.3")
-- Found w3nco: /lcrc/project/OW_UFS/HPC-Stack/lib/libw3nco_4.a (found version "2.4.0")

I used these modules: 1) cmake/3.20.3-vedypwm 2) openmpi/4.1.2 3) anaconda/4.4.0 4) gcc/9.2.0-pkmzczt
And I put
export PATH="/lcrc/project/OW_UFS/HPC-Stack/bin:$PATH"
export LD_LIBRARY_PATH="/lcrc/project/OW_UFS/HPC-Stack/lib:$LD_LIBRARY_PATH"
export CMAKE_PREFIX_PATH="/lcrc/project/OW_UFS/HPC-Stack"
in bashrc

 

I have attached the build log file. Appreciate any help in advance.

Thanks,

Haochen

Thank you for the error report and build log file Haochen!  Let me check with the development team and we'll see what they're able to come up with for you.  Take care!

Shawn Cebula

EPIC End User Support Technologist

Haochen,

Do you have an ESMF module loaded? If so, does it explicitly set ESMFMKFILE to point to the location of esmf.mk (you can check this by doing a module show command on the loaded esmf module)? That's the file that the CMake script is looking for to determine ESMF information. It should be in the same directory as the libesmf.a that cmake is able to find ( /lcrc/project/OW_UFS/HPC-Stack/lib/). Is that file there? If so, but it's not set at compile time either by the module or manually (try echo $ESMFMKFILE) then you can set that explicitly (export $ESMFMKFILE) before making again. 

Best,

Larissa

Permalink

In reply to by larissa.reames

I used  export PATH to load all modules in HPC-Stack, for some reason I couldn't directly use "module load hpc" on our HPC.

The esmf.mk is in /lcrc/project/OW_UFS/HPC-Stack/lib/ .

When I echo $ESMFMKFILE, it shows the path above.

Can you tell me how to set ESMFMKFILE correctly?

 

Does ESMFMKFILE just contain the directory, or the full path? It should be the full path (i.e., directory + file name), which in your case is "/lcrc/project/OW_UFS/HPC-Stack/lib/esmf.mk".  If that doesn't work, could you share a copy of that esmf.mk file? It looks like you're on a non-standard HPC system, so I can't check the contents of it myself.

 

Larissa

Permalink

In reply to by larissa.reames

I put the full path including the file name for ESMFMKFILE. But a new error occurred:

 

/lcrc/project/OW_UFS/UFS_2.0/ufs-srweather-app/src/UFS_UTILS/sorc/fvcom_tools.fd/module_nwp_base.f90:16:37:

   16 |    use kinds, only: r_kind, r_single, rmissing
      |                                     1
Error: Symbol 'rmissing' referenced at (1) not found in module 'kinds'
make[5]: *** [sorc/fvcom_tools.fd/CMakeFiles/fvcom_tools_lib.dir/module_nwp_base.f90.o] Error 1
make[4]: *** [sorc/fvcom_tools.fd/CMakeFiles/fvcom_tools_lib.dir/all] Error 2
make[4]: *** Waiting for unfinished jobs....
[ 44%] Building Fortran object sorc/ncep_post.fd/CMakeFiles/upp.dir/CALWXT.f.o
/lcrc/project/OW_UFS/UFS_2.0/ufs-srweather-app/src/UPP/sorc/ncep_post.fd/CALWXT.f:101:19:
 

Build log is attached.
 

Thank you,

Haochen

 

Attach Files

That appears to be a separate issue, and I'm not really sure what's caused it. When I look at the kinds.f90 that contains the kinds module, I clearly see all of the variables that it's attempting to access on that line, and that file appears to have built successfully, so I don't know what the issue is. I suggest making a new post that addresses that issue as it's more likely to draw the attention of the relevant experts. 

 

Hello, 
   The issue you describe may be related to software libraries/modules not being loaded/built, or build with the different combination of the compilers-MPI. I think your question about compilation of the SRW appears in a different thread as well https://forums.ufscommunity.org/threads/compilation-error-symbol-rmissing-not-found-module-kinds . More information is needed to assist you with finding a quick solution to the issue - please respond to the questions below (in ether thread!):

1) What version of SRW do you use? What was the command you used to checkout the code, i.e. full command-line string "git clone ....."?
2)  List the modules in the shell environment where you build the SRW (from "module  list")
3) What version of HPC-stack have you built, and which compiler - MPI combination did you use?
4) Is the MPI library build with the same gcc/gfortran/g++ compilers that you use to compile both HPC-stack and SRW?
5) List the steps/commands you take to build the SRW that lead to the error.