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

ungrib.exe not generated while compiling WPS

This post was from a previous version of the WRF&MPAS-A Support Forum. New replies have been disabled and if you have follow up questions related to this post, then please start a new thread from the forum home page.

samuel

New member
Hi,

I am trying to compile WPS v3.9 after successfully building WRFv3.9.1.1. geogrid.exe and metgrid.exe were generated but NOT ungrib.exe. I was using Intel compiler (serial) to do the compiling, and am sure the jasper library is ready for the platform I am working on.

The ungrib.exe failed to generate due to "dec_png.c:(.text+0xca): undefined reference to `png_set_longjmp_fn'". More detailed information regarding this error is illustrated below. Searching online I found somebody suggested "edit configure.wps by adding -qopenmp at the end of the lines that set WRF_LIB (after -lnetcdff -lnetcdf)", which is not working for my case.

Could you have any suggestions that I can test to fix this issue? Thank you.

FYI, I also attached the entire compile log file here:
View attachment compile2_wps.log

############# Error message start:
make[1]: Entering directory `/u/home/y/ylin/tests/test/WPS/ungrib/src'
Makefile:90: warning: overriding commands for target `.F.o'
../../configure.wps:105: warning: ignoring old commands for target `.F.o'
Makefile:95: warning: overriding commands for target `.c.o'
../../configure.wps:97: warning: ignoring old commands for target `.c.o'
/bin/rm -f ungrib.exe
if [ -z ] ; then \
ifort -o ungrib.exe misc_definitions_module.o debug_cio.o module_debug.o module_stringutil.o table.o module_datarray.o gridinfo.o new_storage.o filelist.o ungrib.o output.o rrpr.o rd_grib1.o file_delete.o datint.o rd_grib2.o \
-L./ngl -lw3 -lg2_4 \
-L/u/local/apps/jasper/1.900.29/intel-18.0.3_gcc-4.9.3/lib -ljasper -lpng -lz \
-L. -lpgu ; \
else \
ifort -o ungrib.exe misc_definitions_module.o debug_cio.o module_debug.o module_stringutil.o table.o module_datarray.o gridinfo.o new_storage.o filelist.o ungrib.o output.o rrpr.o rd_grib1.o file_delete.o datint.o rd_grib2.o \
./ngl/w3/libw3.a ./ngl/g2/libg2_4.a \
-L/u/local/apps/jasper/1.900.29/intel-18.0.3_gcc-4.9.3/lib -ljasper -lpng -lz \
libpgu.a ; \
fi
ld: ./ngl/libg2_4.a(dec_png.o): in function `dec_png_':
dec_png.c:(.text+0xca): undefined reference to `png_set_longjmp_fn'
make[1]: [ungrib.exe] Error 1 (ignored)
############# Error message end.

Best,
Sam
 
Sam,
Thanks for sending that. Your configure.wps shows that it's looking for the jasper, png, and z libs here:
Code:
COMPRESSION_LIBS    = -L/u/local/apps/jasper/1.900.29/intel-18.0.3_gcc-4.9.3/lib -ljasper -lpng -lz
COMPRESSION_INC     = -I/u/local/apps/jasper/1.900.29/intel-18.0.3_gcc-4.9.3/include

Do you have all the necessary png library files in both the lib and include directories in that path? This is what I see in my lib/ directory:
Code:
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.7
and this is the include/ directory:
Code:
jasper  libpng12  pngconf.h  png.h  zconf.h  zlib.h
 
Top