Scheduled Downtime
On Friday 21 April 2023 @ 5pm MT, this website will be down for maintenance and expected to return online the morning of 24 April 2023 at the latest

(CASE CLOSED) WPS Compile : no ungrib.exe (v3.6.1)

Arty

Member
Hello,

Due to some troubles trying to use old wrfout* (WRF 3.6.1) with WRF/WPS 4.2.1 via ndown.exe (see this thread), I'm willing to run the whole process using WRF/WPS 3.6.1.
I successfully compiled WRF (or, at least, executables have been created, not 0 sized) :
── [ 148 Mar 4 23:08] ./exe_uncoupled
│ ├── [ 37M Mar 4 23:07] ./exe_uncoupled/ndown.exe
│ ├── [ 36M Mar 4 23:07] ./exe_uncoupled/nup.exe
│ ├── [ 37M Mar 4 23:07] ./exe_uncoupled/real.exe
│ ├── [ 36M Mar 4 23:07] ./exe_uncoupled/tc.exe
│ └── [ 43M Mar 4 23:07] ./exe_uncoupled/wrf.exe

However, it didn't go as smoothly with WPS : I can't get ungrib.exe (and also g2print.exe is missing). I checked other threads on that matter but couldn't find similar errors. In my compile log, all "Errors" are followed by " (ignored) " and I'm sorry to tell that I don't get much of what I'm reading above those lines ; and hence can't spot the origin of the problem.

Please see configure.wps and compile.log attached. The file configure.wps.backup.txt is a copy of the original configure.wps prepared by ./configure.
I also attached a .basrc extract to show the environment variables I'm using by default.

IMPORTANT NOTE : I used a copy of the configure.wps file that has been used to compile WPS 4.2.1 (which ran successfully).
Also I did all the tests from Compiling WRF STEP 1 and only the csh test fails, though I can't tell if it's part of the problem.

:~/WPS/WPSV3/TESTS> gfortran TEST_1_fortran_only_fixed.f
:~/WPS/WPSV3/TESTS> ./a.out
SUCCESS test 1 fortran only fixed format
:~/WPS/WPSV3/TESTS> gfortran TEST_2_fortran_only_free.f90
:~/WPS/WPSV3/TESTS> ./a.out
Assume Fortran 2003: has FLUSH, ALLOCATABLE derived type, and ISO C Binding
SUCCESS test 2 fortran only free format
:~/WPS/WPSV3/TESTS> gcc TEST_3_c_only.c
:~/WPS/WPSV3/TESTS> ./a.out
SUCCESS test 3 C only
:~/WPS/WPSV3/TESTS> gcc -c -m64 TEST_4_fortran+c_c.c
:~/WPS/WPSV3/TESTS> gfortran -c -m64 TEST_4_fortran+c_f.f90
:~/WPS/WPSV3/TESTS> gfortran -m64 TEST_4_fortran+c_f.o TEST_4_fortran+c_c.o
:~/WPS/WPSV3/TESTS> ./a.out
C function called by Fortran
Values are xx = 2.00 and ii = 1
SUCCESS test 4 fortran calling c
:~/WPS/WPSV3/TESTS> ./TEST_csh.csh
:~/WPS/WPSV3/TESTS> ./TEST_perl.pl
SUCCESS perl test
:~/WPS/WPSV3/TESTS> ./TEST_sh.sh
SUCCESS sh test

Thank you.

Here are the diff between configure.wps.backup.txt created from ./configure ; and the configure.wps I used

diff configure.wps.backup configure.wps
19c19,20
< -L/usr/X11R6/lib -lX11
---
> -lX11 -lXext -lpng -lz -lcairo -lfontconfig -lpixman-1 \
> -lfreetype -lexpat -lpthread -lbz2 -lXrender -lgfortran -lgcc
34c35
< WRF_DIR = /home3/datahome/pmauger/WRF/WRFV3
---
> WRF_DIR = /home3/datahome/pmauger/WRF/WRFV3
41c42
< -I$(NETCDF)/include
---
> -I/home/datawork-wave/NETCDF2019/INTEL/include -I/home/datawork-wave/NETCDF2019/INTEL/include
47c48
< -L$(NETCDF)/lib -lnetcdf
---
> -L/home/datawork-wave/NETCDF2019/INTEL/lib -lnetcdff -L/home/datawork-wave/NETCDF2019/INTEL/lib -lnetcdf -lnetcdf -lm -lhdf5hl_fortran -lhdf5_hl -lhdf5_fortran -lhdf5 -ldl -lm -lz -ludunits2
73c74
< LDFLAGS = -L$(MPI_ROOT)/lib -lmpi
---
> LDFLAGS =
 

Attachments

  • configure.wps
    3.6 KB · Views: 3
  • compile.log
    97.9 KB · Views: 3
  • configure.wps.backup.txt
    3.2 KB · Views: 3
  • bashrc_extract.txt
    913 bytes · Views: 2
Last edited:
Did you try to compile WPS using the configure.wps file that was created with "./configure" in the WPSV3.6.1 directory, or did you only try with the copy of the configure.wps file from V4.2.1? There are likely new components added to the configure between v3.6.1 and v4.2.1 that could cause issues. If you tried that and got an error, please send the compile log for that particular compiler.

Also make sure that your jasper, zlib, and libpng libraries are actually in the location listed for COMPRESSION_LIBS and COMPRESSION_INC in the configure.wps file.

Code:
COMPRESSION_LIBS    = -L/home/datawork-wave/NETCDF2019/INTEL/lib -ljasper -lpng -lz
COMPRESSION_INC     = -I/home/datawork-wave/NETCDF2019/INTEL/include/jasper

Also to note, even if you compile WRF with the dmpar option, it's not necessary to compile WPS with that option. Unless your domains are going to be thousands by thousands of grid cells, compiling serially should be just fine.
 
Did you try to compile WPS using the configure.wps file that was created with "./configure" in the WPSV3.6.1 directory, or did you only try with the copy of the configure.wps file from V4.2.1? There are likely new components added to the configure between v3.6.1 and v4.2.1 that could cause issues. If you tried that and got an error, please send the compile log for that particular compiler.
See attached the default configure.wps (only modified WRF_DIR path and mpiifort / mpiifort lines) as well as the default compile.log
Also make sure that your jasper, zlib, and libpng libraries are actually in the location listed for COMPRESSION_LIBS and COMPRESSION_INC in the configure.wps file.

Code:
COMPRESSION_LIBS    = -L/home/datawork-wave/NETCDF2019/INTEL/lib -ljasper -lpng -lz
COMPRESSION_INC     = -I/home/datawork-wave/NETCDF2019/INTEL/include/jasper
I tried to locate the directories you mentioned :

Code:
:/home/datawork-wave/NETCDF2019/INTEL> find . -type d -name 'jasper'
./include/jasper
find: ‘./src/jasper-2.0.14’: Permission denied
:/home/datawork-wave/NETCDF2019/INTEL> find . -type d -name 'zlib'
find: ‘./src/jasper-2.0.14’: Permission denied
./src/libpng-1.6.34/projects/vstudio/zlib
:/home/datawork-wave/NETCDF2019/INTEL> find . -type d -name 'libpng'
find: ‘./src/jasper-2.0.14’: Permission denied
./src/libpng-1.6.34/projects/vstudio/libpng

drwxr-xr-x 6 maccensi droos 4096 May 4 2020 .
drwxr-xr-x 13 maccensi droos 4096 May 4 2020 ..
-rwxr-xr-x 1 maccensi droos 82588 May 4 2020 antlr.py
drwxr-xr-x 3 maccensi droos 4096 May 4 2020 cmake
drwxr-xr-x 2 maccensi droos 4096 May 4 2020 engines-1.1
-rwxr-xr-x 1 maccensi droos 843088 May 4 2020 libantlr.a
-rwxr-xr-x 1 maccensi droos 5807306 May 4 2020 libcrypto.a
lrwxrwxrwx 1 maccensi droos 16 May 4 2020 libcrypto.so -> libcrypto.so.1.1
-rwxr-xr-x 1 maccensi droos 3633936 May 4 2020 libcrypto.so.1.1
-rwxr-xr-x 1 maccensi droos 1021 May 4 2020 libcurl.la
lrwxrwxrwx 1 maccensi droos 16 May 4 2020 libcurl.so -> libcurl.so.4.6.0
lrwxrwxrwx 1 maccensi droos 16 May 4 2020 libcurl.so.4 -> libcurl.so.4.6.0
-rwxr-xr-x 1 maccensi droos 725040 May 4 2020 libcurl.so.4.6.0
-rwxr-xr-x 1 maccensi droos 648928 May 4 2020 libeccodes_f90.so
-rwxr-xr-x 1 maccensi droos 9180888 May 4 2020 libeccodes.so
-rwxr-xr-x 1 maccensi droos 983 May 4 2020 libexpat.la
lrwxrwxrwx 1 maccensi droos 17 May 4 2020 libexpat.so -> libexpat.so.1.6.7
lrwxrwxrwx 1 maccensi droos 17 May 4 2020 libexpat.so.1 -> libexpat.so.1.6.7
-rwxr-xr-x 1 maccensi droos 233552 May 4 2020 libexpat.so.1.6.7
-rwxr-xr-x 1 maccensi droos 985 May 4 2020 libfl.la
lrwxrwxrwx 1 maccensi droos 14 May 4 2020 libfl.so -> libfl.so.2.0.0
lrwxrwxrwx 1 maccensi droos 14 May 4 2020 libfl.so.2 -> libfl.so.2.0.0
-rwxr-xr-x 1 maccensi droos 9448 May 4 2020 libfl.so.2.0.0
-rwxr-xr-x 1 maccensi droos 1367 May 4 2020 libgslcblas.la
lrwxrwxrwx 1 maccensi droos 20 May 4 2020 libgslcblas.so -> libgslcblas.so.0.0.0
lrwxrwxrwx 1 maccensi droos 20 May 4 2020 libgslcblas.so.0 -> libgslcblas.so.0.0.0
-rwxr-xr-x 1 maccensi droos 502632 May 4 2020 libgslcblas.so.0.0.0
-rwxr-xr-x 1 maccensi droos 1341 May 4 2020 libgsl.la
lrwxrwxrwx 1 maccensi droos 16 May 4 2020 libgsl.so -> libgsl.so.23.1.0
lrwxrwxrwx 1 maccensi droos 16 May 4 2020 libgsl.so.23 -> libgsl.so.23.1.0
-rwxr-xr-x 1 maccensi droos 4317792 May 4 2020 libgsl.so.23.1.0
-rwxr-xr-x 1 maccensi droos 1221 May 4 2020 libh5bzip2.la
-rwxr-xr-x 1 maccensi droos 98432 May 4 2020 libh5bzip2.so
-rwxr-xr-x 1 maccensi droos 1206 May 4 2020 libhdf5_fortran.la
lrwxrwxrwx 1 maccensi droos 26 May 4 2020 libhdf5_fortran.so -> libhdf5_fortran.so.102.0.0
lrwxrwxrwx 1 maccensi droos 26 May 4 2020 libhdf5_fortran.so.102 -> libhdf5_fortran.so.102.0.0
-rwxr-xr-x 1 maccensi droos 489264 May 4 2020 libhdf5_fortran.so.102.0.0
-rwxr-xr-x 1 maccensi droos 1333 May 4 2020 libhdf5hl_fortran.la
lrwxrwxrwx 1 maccensi droos 20 May 4 2020 libhdf5_hl_fortran.so -> libhdf5hl_fortran.so
lrwxrwxrwx 1 maccensi droos 28 May 4 2020 libhdf5hl_fortran.so -> libhdf5hl_fortran.so.100.0.4
lrwxrwxrwx 1 maccensi droos 28 May 4 2020 libhdf5hl_fortran.so.100 -> libhdf5hl_fortran.so.100.0.4
-rwxr-xr-x 1 maccensi droos 222240 May 4 2020 libhdf5hl_fortran.so.100.0.4
-rwxr-xr-x 1 maccensi droos 1176 May 4 2020 libhdf5_hl.la
lrwxrwxrwx 1 maccensi droos 21 May 4 2020 libhdf5_hl.so -> libhdf5_hl.so.100.1.2
lrwxrwxrwx 1 maccensi droos 21 May 4 2020 libhdf5_hl.so.100 -> libhdf5_hl.so.100.1.2
-rwxr-xr-x 1 maccensi droos 163504 May 4 2020 libhdf5_hl.so.100.1.2
-rwxr-xr-x 1 maccensi droos 1106 May 4 2020 libhdf5.la
-rwxr-xr-x 1 maccensi droos 3150 May 4 2020 libhdf5.settings
lrwxrwxrwx 1 maccensi droos 18 May 4 2020 libhdf5.so -> libhdf5.so.103.1.0
lrwxrwxrwx 1 maccensi droos 18 May 4 2020 libhdf5.so.103 -> libhdf5.so.103.1.0
-rwxr-xr-x 1 maccensi droos 5113200 May 4 2020 libhdf5.so.103.1.0
lrwxrwxrwx 1 maccensi droos 27 May 4 2020 libjasper.so -> ../lib64/libjasper.so.4.0.0
lrwxrwxrwx 1 maccensi droos 27 May 4 2020 libjasper.so.4 -> ../lib64/libjasper.so.4.0.0
lrwxrwxrwx 1 maccensi droos 27 May 4 2020 libjasper.so.4.0.0 -> ../lib64/libjasper.so.4.0.0
-rwxr-xr-x 1 maccensi droos 934 May 4 2020 libjpeg.la
lrwxrwxrwx 1 maccensi droos 16 May 4 2020 libjpeg.so -> libjpeg.so.9.4.0
lrwxrwxrwx 1 maccensi droos 16 May 4 2020 libjpeg.so.9 -> libjpeg.so.9.4.0
-rwxr-xr-x 1 maccensi droos 1239832 May 4 2020 libjpeg.so.9.4.0
-rwxr-xr-x 1 maccensi droos 1531160 May 4 2020 libnco-4.9.2.so
-rwxr-xr-x 1 maccensi droos 164384 May 4 2020 libnco_c++-4.9.2.so
-rwxr-xr-x 1 maccensi droos 1480 May 4 2020 libnco_c++.la
lrwxrwxrwx 1 maccensi droos 19 May 4 2020 libnco_c++.so -> libnco_c++-4.9.2.so
-rwxr-xr-x 1 maccensi droos 1456 May 4 2020 libnco.la
lrwxrwxrwx 1 maccensi droos 15 May 4 2020 libnco.so -> libnco-4.9.2.so
-rwxr-xr-x 1 maccensi droos 1422 May 4 2020 libnetcdff.la
lrwxrwxrwx 1 maccensi droos 19 May 4 2020 libnetcdff.so -> libnetcdff.so.7.0.0
lrwxrwxrwx 1 maccensi droos 19 May 4 2020 libnetcdff.so.7 -> libnetcdff.so.7.0.0
-rwxr-xr-x 1 maccensi droos 809168 May 4 2020 libnetcdff.so.7.0.0
-rwxr-xr-x 1 maccensi droos 1228 May 4 2020 libnetcdf.la
-rwxr-xr-x 1 maccensi droos 1100 May 4 2020 libnetcdf.settings
lrwxrwxrwx 1 maccensi droos 19 May 4 2020 libnetcdf.so -> libnetcdf.so.15.2.1
lrwxrwxrwx 1 maccensi droos 19 May 4 2020 libnetcdf.so.15 -> libnetcdf.so.15.2.1
-rwxr-xr-x 1 maccensi droos 1892152 May 4 2020 libnetcdf.so.15.2.1
drwxr-xr-x 3 maccensi droos 4096 May 4 2020 libO
-rwxr-xr-x 1 maccensi droos 1354 May 4 2020 libpng16.la
lrwxrwxrwx 1 maccensi droos 19 May 4 2020 libpng16.so -> libpng16.so.16.34.0
lrwxrwxrwx 1 maccensi droos 19 May 4 2020 libpng16.so.16 -> libpng16.so.16.34.0
-rwxr-xr-x 1 maccensi droos 296832 May 4 2020 libpng16.so.16.34.0
lrwxrwxrwx 1 maccensi droos 11 May 4 2020 libpng.la -> libpng16.la
lrwxrwxrwx 1 maccensi droos 11 May 4 2020 libpng.so -> libpng16.so
-rwxr-xr-x 1 maccensi droos 1046344 May 4 2020 libssl.a
lrwxrwxrwx 1 maccensi droos 13 May 4 2020 libssl.so -> libssl.so.1.1
-rwxr-xr-x 1 maccensi droos 737472 May 4 2020 libssl.so.1.1
-rwxr-xr-x 1 maccensi droos 1054 May 4 2020 libudunits2.la
lrwxrwxrwx 1 maccensi droos 20 May 4 2020 libudunits2.so -> libudunits2.so.0.1.0
lrwxrwxrwx 1 maccensi droos 20 May 4 2020 libudunits2.so.0 -> libudunits2.so.0.1.0
-rwxr-xr-x 1 maccensi droos 202864 May 4 2020 libudunits2.so.0.1.0
drwxr-xr-x 2 maccensi droos 4096 May 4 2020 pkgconfig

drwxr-xr-x 2 maccensi droos 4096 May 4 2020 .
drwxr-xr-x 8 maccensi droos 8192 May 4 2020 ..
-rw-r--r-- 1 maccensi droos 8191 Sep 14 2017 jas_cm.h
-rw-r--r-- 1 maccensi droos 1583 May 4 2020 jas_config.h
-rw-r--r-- 1 maccensi droos 4595 Sep 14 2017 jas_debug.h
-rw-r--r-- 1 maccensi droos 635 Sep 14 2017 jas_dll.h
-rw-r--r-- 1 maccensi droos 13357 Sep 14 2017 jas_fix.h
-rw-r--r-- 1 maccensi droos 4744 Sep 14 2017 jas_getopt.h
-rw-r--r-- 1 maccensi droos 15626 Sep 14 2017 jas_icc.h
-rw-r--r-- 1 maccensi droos 19499 Sep 14 2017 jas_image.h
-rw-r--r-- 1 maccensi droos 3505 Sep 14 2017 jas_init.h
-rw-r--r-- 1 maccensi droos 4732 Sep 14 2017 jas_malloc.h
-rw-r--r-- 1 maccensi droos 9125 Sep 14 2017 jas_math.h
-rw-r--r-- 1 maccensi droos 3760 Sep 14 2017 jasper.h
-rw-r--r-- 1 maccensi droos 10928 Sep 14 2017 jas_seq.h
-rw-r--r-- 1 maccensi droos 15470 Sep 14 2017 jas_stream.h
-rw-r--r-- 1 maccensi droos 3840 Sep 14 2017 jas_string.h
-rw-r--r-- 1 maccensi droos 3738 Sep 14 2017 jas_tmr.h
-rw-r--r-- 1 maccensi droos 5431 Sep 14 2017 jas_tvp.h
-rw-r--r-- 1 maccensi droos 5352 Sep 14 2017 jas_types.h
-rw-r--r-- 1 maccensi droos 4943 Sep 14 2017 jas_version.h

Also to note, even if you compile WRF with the dmpar option, it's not necessary to compile WPS with that option. Unless your domains are going to be thousands by thousands of grid cells, compiling serially should be just fine.
I have two configurations of two nested domains each ; first one is around 445x165 + 121x121 ; second is around 121x121 two times. Usually, the last one takes 1h to run WPS for 5 days.
 

Attachments

  • compile-default.log
    152.5 KB · Views: 0
  • configure-default.wps
    3.2 KB · Views: 0
  • list in INTEL-lib.txt
    6.4 KB · Views: 1
  • list INTEL-src.txt
    1.3 KB · Views: 0
Last edited:
@Whatheway
Only metgrid and geogrid rely on the WRF build. Ungrib is separate and shouldn't have anything to do with HDF5 or NetCDF.

@Arty
When I look in the path where I have the GRIB2 libraries built, I see the following for my lib/ and include/ directories.

Code:
> ls ../grib2/lib
libjasper.a   libpng12.a   libpng12.so    libpng12.so.0.50.0  libpng.la  libpng.so.3       libz.a   libz.so.1       pkgconfig
libjasper.la  libpng12.la  libpng12.so.0  libpng.a            libpng.so  libpng.so.3.50.0  libz.so  libz.so.1.2.11

> ls /grib2/include
jasper  libpng12  pngconf.h  png.h  zconf.h  zlib.h

It looks like you're missing several of those. Since those libraries are so simple to install, perhaps you can try to rebuild them all (maybe in a new directory), following the steps listed here. You will need to have the same libaries I have listed in order to build ungrib with GRIB2 capability.
 
It looks like you're missing several of those. Since those libraries are so simple to install, perhaps you can try to rebuild them all (maybe in a new directory), following the steps listed here. You will need to have the same libaries I have listed in order to build ungrib with GRIB2 capability.
I was thinking of doing that, but was unsure of potential version problem.

Edit : you should know that links for NetCDF libraries C & Fortran are dead on the Compiling WRF page.
 
Last edited:
Thank you for letting me know! I've fixed the links now. You may need to refresh the web page.
Thanks. I managed to find the missing files elsewhere. Nevertheless, could you please confirm there's no required version(s) of these libraries for WPS 3.6.1 to work properly ?
 
I don't believe there are specific versions of the GRIB2 libraries that are required. There is information about downloading the libraries from this section of the WPS chapter in the WRF Users Guide, and the instructions just tell users to go to the library homepage and find a download. The versions we provide in the Compile Tutorial are

Jasper V1.900.1
libPNG V1.2.50
zlib V1.2.11
 
I don't believe there are specific versions of the GRIB2 libraries that are required. There is information about downloading the libraries from this section of the WPS chapter in the WRF Users Guide, and the instructions just tell users to go to the library homepage and find a download. The versions we provide in the Compile Tutorial are

Jasper V1.900.1
libPNG V1.2.50
zlib V1.2.11

I had some problems setting up libraries but fortunately, I spotted access rights problem and had to wait for an administrator to help. WRF & WPS 3.6.1 are now compiled properly. I'm going to attempt to run my whole protocol with ndown.exe under this version corresponding to the wrfout* I'm using as input.
Nevertheless, I did create a post dedicated to this ndown corrupted output problems because I would really like to understand what has gone wrong all this time.
Thanks for your support, I really appreciate it.
 
Top