ARW WRF compile

I am using 2022_225_Linux_x86_64_cuda_11.7 version
while compile WRF version 4.4 with option 54 and basic option. I got error messages:

make[1]: Entering directory ‘/home/zoom/WRF/WRFV4.4’

( cd frame ; make -i -r -j 2 LLIST=“” framework ;
cd …/external/io_netcdf ;
make -i -r NETCDFPATH=“/home/zoom/WRF/LIBRARIES/netcdf”
FC=“time mpif90 -w -Mfree -byteswapio -r4 -i4 " RANLIB=“ranlib”
CPP=”/lib/cpp -P -nostdinc" LDFLAGS=" -O3 -w -Mfree -byteswapio " TRADFLAG=“-traditional-cpp” ESMF_IO_LIB_EXT=“-L/home/zoom/WRF/WRFV4.4/external/esmf_time_f90 -lesmf_time”
LIB_LOCAL=“”
ESMF_MOD_DEPENDENCE=“/home/zoom/WRF/WRFV4.4/external/esmf_time_f90/module_utility.o” AR=“INTERNAL_BUILD_ERROR_SHOULD_NOT_NEED_AR” diffwrf;
cd …/io_netcdf ;
make -i -r NETCDFPATH=“/home/zoom/WRF/LIBRARIES/netcdf”
FC=“pgf90 -w -Mfree -byteswapio -r4 -i4 " RANLIB=“ranlib”
CPP=”/lib/cpp -P -nostdinc" LDFLAGS=" -O3 -w -Mfree -byteswapio " TRADFLAG=“-traditional-cpp” ESMF_IO_LIB_EXT=“-L/home/zoom/WRF/WRFV4.4/external/esmf_time_f90 -lesmf_time”
LIB_LOCAL=“”
ESMF_MOD_DEPENDENCE=“/home/zoom/WRF/WRFV4.4/external/esmf_time_f90/module_utility.o” AR=“INTERNAL_BUILD_ERROR_SHOULD_NOT_NEED_AR”; \

The AR line is just a setting in the Makefile and shouldn’t cause an error.

Can you please look further down in the output to see what the actual error is?

Dear Mat:

I supplied two parts. I hope it can help.

( cd /home/zoom/WRF/WRFV4.4/external/io_int ;
make -j 2 CC=“mpicc -cc=pgcc -DFSEEKO64_OK " CFLAGS_LOCAL=”-w -O3 -DRPC_TYPES=1 " RM=“rm -f” RANLIB=“ranlib” CPP=“/lib/cpp -P -nostdinc”
FC=“time mpif90 -f90=pgf90 -r4 -i4 -w -Mfree -byteswapio " FGREP=“fgrep -iq”
TRADFLAG=”-traditional-cpp" AR=“ar” ARFLAGS=“ru” ARCHFLAGS=“-DEM_CORE=1 -DNMM_CORE=0 -DNMM_MAX_DIM=2600 -DDA_CORE=0 -DWRFPLUS=0 -DIWORDSIZE=4 -DDWORDSIZE=8 -DRWORDSIZE=4 -DLWORDSIZE=4 -DNONSTANDARD_SYSTEM_SUBR -DWRF_USE_CLM -DDM_PARALLEL -DNETCDF -DHDF5 -DLANDREAD_STUB=1 -DUSE_ALLOCATABLES -Dwrfmodel -DGRIB1 -DINTIO -DKEEP_INT_AROUND -DLIMIT_ARGS -DBUILD_RRTMG_FAST=0 -DBUILD_RRTMK=0 -DBUILD_SBM_FAST=1 -DSHOW_ALL_VARS_USED=0 -DCONFIG_BUF_LEN=65536 -DMAX_DOMAINS_F=21 -DMAX_HISTORY=25 -DNMM_NEST=0” all )
make[3]: Entering directory ‘/home/zoom/WRF/WRFV4.4/external/io_int’
mpicc -cc=pgcc -DFSEEKO64_OK -o io_int_idx.o -c -w -O3 -DRPC_TYPES=1 io_int_idx.c
time mpif90 -f90=pgf90 -r4 -i4 -w -Mfree -byteswapio -I…/…/frame -o module_io_int_read.o -c module_io_int_read.f
/opt/nvidia/hpc_sdk/Linux_x86_64/22.5/comm_libs/openmpi/openmpi-3.1.5/bin/.bin/mpicc: /home/zoom/WRF/Libs/grib2/lib/libz.so.1: no version information available (required by /opt/nvidia/hpc_sdk/Linux_x86_64/22.5/comm_libs/openmpi/openmpi-3.1.5/bin/.bin/…/…/lib/libopen-pal.so.40)
/opt/nvidia/hpc_sdk/Linux_x86_64/22.5/comm_libs/openmpi/openmpi-3.1.5/bin/.bin/mpif90: /home/zoom/WRF/Libs/grib2/lib/libz.so.1: no version information available (required by /opt/nvidia/hpc_sdk/Linux_x86_64/22.5/comm_libs/openmpi/openmpi-3.1.5/bin/.bin/…/…/lib/libopen-pal.so.40)
nvc-Error-Unknown switch: -cc=pgcc
nvfortran-Error-Unknown switch: -f90=pgf90
make[3]: [makefile:39: io_int_idx.o] Error 1 (ignored)
Command exited with non-zero status 1
0.01user 0.00system 0:00.02elapsed 100%CPU (0avgtext+0avgdata 6376maxresident)k
0inputs+0outputs (0major+2074minor)pagefaults 0swaps
make[3]: [makefile:48: module_io_int_read.o] Error 1 (ignored)
Diffwrf io_int will be built later on in this compile. No need to rerun compile.
Diffwrf io_int will be built later on in this compile. No need to rerun compile.
Diffwrf io_int will be built later on in this compile. No need to rerun compile.
Diffwrf io_int will be built later on in this compile. No need to rerun compile.
rm -f libwrfio_int.a
Diffwrf io_int will be built later on in this compile. No need to rerun compile.
ar ru libwrfio_int.a io_int.o io_int_idx.o module_io_int_idx.o module_io_int_read.o
ar: /home/zoom/WRF/Libs/grib2/lib/libz.so.1: no version information available (required by /lib/x86_64-linux-gnu/libbfd-2.34-system.so)
ar: u' modifier ignored since D’ is the default (see `U’)
ar: creating libwrfio_int.a
ar: io_int_idx.o: No such file or directory
make[3]: [makefile:21: libwrfio_int.a] Error 1 (ignored)
ranlib libwrfio_int.a
ranlib: /home/zoom/WRF/Libs/grib2/lib/libz.so.1: no version information available (required by /lib/x86_64-linux-gnu/libbfd-2.34-system.so)
ranlib: ‘libwrfio_int.a’: No such file
make[3]: [makefile:22: libwrfio_int.a] Error 1 (ignored)
if [ -f …/…/frame/pack_utils.o -a -f …/…/frame/clog.o ] ; then
time mpif90 -f90=pgf90 -r4 -i4 -w -Mfree -byteswapio -O3 -w -Mfree -byteswapio -I…/ioapi_share -o diffwrf diffwrf.f
…/…/frame/pack_utils.o …/…/frame/module_internal_header_util.o …/…/frame/module_driver_constants.o …/…/frame/module_machine.o …/…/frame/module_wrf_error.o …/…/frame/wrf_debug.o libwrfio_int.a ;
fi
time mpif90 -f90=pgf90 -r4 -i4 -w -Mfree -byteswapio -O3 -w -Mfree -byteswapio -o test_io_idx test_io_idx.f -L. -lwrfio_int
/opt/nvidia/hpc_sdk/Linux_x86_64/22.5/comm_libs/openmpi/openmpi-3.1.5/bin/.bin/mpif90: /home/zoom/WRF/Libs/grib2/lib/libz.so.1: no version information available (required by /opt/nvidia/hpc_sdk/Linux_x86_64/22.5/comm_libs/openmpi/openmpi-3.1.5/bin/.bin/…/…/lib/libopen-pal.so.40)
nvfortran-Error-Unknown switch: -f90=pgf90
Command exited with non-zero status 1

( cd /home/zoom/WRF/WRFV4.4/external/io_int ;
make -j 2 CC=“mpicc -cc=pgcc -DFSEEKO64_OK " CFLAGS_LOCAL=”-w -O3 -DRPC_TYPES=1 " RM=“rm -f” RANLIB=“ranlib” CPP=“/lib/cpp -P -nostdinc”
FC=“time mpif90 -f90=pgf90 -r4 -i4 -w -Mfree -byteswapio " FGREP=“fgrep -iq”
TRADFLAG=”-traditional-cpp" AR=“ar” ARFLAGS=“ru” ARCHFLAGS=“-DEM_CORE=1 -DNMM_CORE=0 -DNMM_MAX_DIM=2600 -DDA_CORE=0 -DWRFPLUS=0 -DIWORDSIZE=4 -DDWORDSIZE=8 -DRWORDSIZE=4 -DLWORDSIZE=4 -DNONSTANDARD_SYSTEM_SUBR -DWRF_USE_CLM -DDM_PARALLEL -DNETCDF -DHDF5 -DLANDREAD_STUB=1 -DUSE_ALLOCATABLES -Dwrfmodel -DGRIB1 -DINTIO -DKEEP_INT_AROUND -DLIMIT_ARGS -DBUILD_RRTMG_FAST=0 -DBUILD_RRTMK=0 -DBUILD_SBM_FAST=1 -DSHOW_ALL_VARS_USED=0 -DCONFIG_BUF_LEN=65536 -DMAX_DOMAINS_F=21 -DMAX_HISTORY=25 -DNMM_NEST=0” all )
make[3]: Entering directory ‘/home/zoom/WRF/WRFV4.4/external/io_int’
mpicc -cc=pgcc -DFSEEKO64_OK -o io_int_idx.o -c -w -O3 -DRPC_TYPES=1 io_int_idx.c
time mpif90 -f90=pgf90 -r4 -i4 -w -Mfree -byteswapio -I…/…/frame -o module_io_int_read.o -c module_io_int_read.f
/opt/nvidia/hpc_sdk/Linux_x86_64/22.5/comm_libs/openmpi/openmpi-3.1.5/bin/.bin/mpicc: /home/zoom/WRF/Libs/grib2/lib/libz.so.1: no version information available (required by /opt/nvidia/hpc_sdk/Linux_x86_64/22.5/comm_libs/openmpi/openmpi-3.1.5/bin/.bin/…/…/lib/libopen-pal.so.40)
/opt/nvidia/hpc_sdk/Linux_x86_64/22.5/comm_libs/openmpi/openmpi-3.1.5/bin/.bin/mpif90: /home/zoom/WRF/Libs/grib2/lib/libz.so.1: no version information available (required by /opt/nvidia/hpc_sdk/Linux_x86_64/22.5/comm_libs/openmpi/openmpi-3.1.5/bin/.bin/…/…/lib/libopen-pal.so.40)
nvc-Error-Unknown switch: -cc=pgcc
nvfortran-Error-Unknown switch: -f90=pgf90
make[3]: [makefile:39: io_int_idx.o] Error 1 (ignored)
Command exited with non-zero status 1
0.01user 0.00system 0:00.02elapsed 100%CPU (0avgtext+0avgdata 6376maxresident)k
0inputs+0outputs (0major+2074minor)pagefaults 0swaps
make[3]: [makefile:48: module_io_int_read.o] Error 1 (ignored)
Diffwrf io_int will be built later on in this compile. No need to rerun compile.
Diffwrf io_int will be built later on in this compile. No need to rerun compile.
Diffwrf io_int will be built later on in this compile. No need to rerun compile.
Diffwrf io_int will be built later on in this compile. No need to rerun compile.
rm -f libwrfio_int.a
Diffwrf io_int will be built later on in this compile. No need to rerun compile.
ar ru libwrfio_int.a io_int.o io_int_idx.o module_io_int_idx.o module_io_int_read.o
ar: /home/zoom/WRF/Libs/grib2/lib/libz.so.1: no version information available (required by /lib/x86_64-linux-gnu/libbfd-2.34-system.so)
ar: u' modifier ignored since D’ is the default (see `U’)
ar: creating libwrfio_int.a
ar: io_int_idx.o: No such file or directory
make[3]: [makefile:21: libwrfio_int.a] Error 1 (ignored)
ranlib libwrfio_int.a
ranlib: /home/zoom/WRF/Libs/grib2/lib/libz.so.1: no version information available (required by /lib/x86_64-linux-gnu/libbfd-2.34-system.so)
ranlib: ‘libwrfio_int.a’: No such file
make[3]: [makefile:22: libwrfio_int.a] Error 1 (ignored)
if [ -f …/…/frame/pack_utils.o -a -f …/…/frame/clog.o ] ; then
time mpif90 -f90=pgf90 -r4 -i4 -w -Mfree -byteswapio -O3 -w -Mfree -byteswapio -I…/ioapi_share -o diffwrf diffwrf.f
…/…/frame/pack_utils.o …/…/frame/module_internal_header_util.o …/…/frame/module_driver_constants.o …/…/frame/module_machine.o …/…/frame/module_wrf_error.o …/…/frame/wrf_debug.o libwrfio_int.a ;
fi
time mpif90 -f90=pgf90 -r4 -i4 -w -Mfree -byteswapio -O3 -w -Mfree -byteswapio -o test_io_idx test_io_idx.f -L. -lwrfio_int
/opt/nvidia/hpc_sdk/Linux_x86_64/22.5/comm_libs/openmpi/openmpi-3.1.5/bin/.bin/mpif90: /home/zoom/WRF/Libs/grib2/lib/libz.so.1: no version information available (required by /opt/nvidia/hpc_sdk/Linux_x86_64/22.5/comm_libs/openmpi/openmpi-3.1.5/bin/.bin/…/…/lib/libopen-pal.so.40)
nvfortran-Error-Unknown switch: -f90=pgf90
Command exited with non-zero status 1

Looks like you went back to using option 62 as it adds the “-f90” and “-cc” options but 54 does not.

 52. (serial)  53. (smpar)  54. (dmpar)  55. (dm+sm)   PGI (pgf90/pgcc)
 56. (serial)  57. (smpar)  58. (dmpar)  59. (dm+sm)   PGI (pgf90/gcc): -f90=pgf90
 60. (serial)  61. (smpar)  62. (dmpar)  63. (dm+sm)   PGI (pgf90/pgcc): -f90=pgf90

As I noted before, the “-f90” and “-cc” flag can only be used with MPI implementations that used it as a switch to set the Fortran or C compiler drivers. In this case your MPI is passing the flag to the compiler which does not recognize this option.

-Mat

Dear Mat:

I found my problem.
For WRF 4.4, I need hdf5 library and netcdf. This was not mentioned in the WRF Tutor webpage. After I installed hdf5-1-12-2, netcdf-c-4.8.1 and netcdf-fortran-4.5.4. The compilation is OK.
Now, I bump into new problem.
When I ran geogrid.exe in WPS, I have errors like below.

How can I solve this problem?
Thank you again for your help.

Regards,

Zoom

zoom@Ryzen:~/WRF.new/WPS$ ./geogrid.exe
[Ryzen:238763] [[INVALID],INVALID] ORTE_ERROR_LOG: A system-required executable either could not be found or was not executable by this user in file …/…/…/…/…/orte/mca/ess/singleton/ess_singleton_module.c at line 388
[Ryzen:238763] [[INVALID],INVALID] ORTE_ERROR_LOG: A system-required executable either could not be found or was not executable by this user in file …/…/…/…/…/orte/mca/ess/singleton/ess_singleton_module.c at line 166

Not sure either, but doing a web search, some common causes of this is that the wrong MPI shared libraries are being used or can be found.

What’s the output from “ldd ./geogrid.exe”?
What’s LD_LIBRARY_PATH set to? (i.e. run “echo $LD_LIBRARY_PATH”)
What’s LD_PRELOAD set to? (i.e. “echo $LD_PRELOAD”).

Chris post this solution for a user with the same error:
Error running simple MPI code with OpenMPI from PGI installe
Though this was 4 years ago, and I’m not sure setting OPAL_PREFIX will fix this, but worth a try.

-Mat

Dear Mat:

I download mpich-4.0.2 and installed this one as my mpi, instead use the mpi library come with NVIDIA hpc sdk. There is no problem running with geogrid, ungrib and metgrid.
I tried Chris’s method: export OPAL_PREFIX. This crashed my system.

Now it is working.

Thank you for your help.

The WRF tutor web page needs to be updated. But NCAR forgot to do so.
The old tutor only works for GNU compiler. But not for Intel and Nvidia compiler.
For your info, GNU runs no slow than Nvidia hpc.

Regards,
zoom

Mat Colgrove via NVIDIA Developer Forums <notifications@nvidia.discoursemail.com> 於 2022年7月1日 週五 凌晨12:02寫道: