WPS 3.8.1 ungrib.exe cannot be compiled

All things involving the setup (compiling, NetCDF, etc.) of the WRF Model itself.

WPS 3.8.1 ungrib.exe cannot be compiled

Postby Bhavana Medisetti » Tue Oct 24, 2017 1:55 am

Sir,
I am trying to compile the WPS version 3.8.1, geogrid.exe and metgrid.exe compiled successfully , but ungrib.exe cannot be compiled . Can anyone help me please ,I am attaching my error file

**** Compiling ungrib ****

( cd src/ngl ; make -i -r DEV_TOP="/home/mbhavana/Build_WRF/WPS" CC="gcc" FC="gfortran" RANLIB="ranlib " all )
make[1]: Entering directory `/home/mbhavana/Build_WRF/WPS/ungrib/src/ngl'
( cd w3 ; make -i -r DEV_TOP="/home/mbhavana/Build_WRF/WPS" all ; ranlib libw3.a )
make[2]: Entering directory `/home/mbhavana/Build_WRF/WPS/ungrib/src/ngl/w3'
Makefile:44: warning: overriding recipe for target `.f.o'
/home/mbhavana/Build_WRF/WPS/configure.wps:99: warning: ignoring old recipe for target `.f.o'
Makefile:48: warning: overriding recipe for target `.c.o'
/home/mbhavana/Build_WRF/WPS/configure.wps:95: warning: ignoring old recipe for target `.c.o'
/bin/rm -f bacio_module.o
gfortran -ffixed-form -O -fconvert=big-endian -frecord-marker=4 -c bacio_module.f
/bin/rm -f getgb.o
gfortran -ffixed-form -O -fconvert=big-endian -frecord-marker=4 -c getgb.f
/bin/rm -f getgbmh.o
gfortran -ffixed-form -O -fconvert=big-endian -frecord-marker=4 -c getgbmh.f
/bin/rm -f putgbex.o
gfortran -ffixed-form -O -fconvert=big-endian -frecord-marker=4 -c putgbex.f
/bin/rm -f w3fi73.o
gfortran -ffixed-form -O -fconvert=big-endian -frecord-marker=4 -c w3fi73.f
/bin/rm -f getgb1r.o
gfortran -ffixed-form -O -fconvert=big-endian -frecord-marker=4 -c getgb1r.f
/bin/rm -f getgbmp.o
gfortran -ffixed-form -O -fconvert=big-endian -frecord-marker=4 -c getgbmp.f
/bin/rm -f putgbn.o
gfortran -ffixed-form -O -fconvert=big-endian -frecord-marker=4 -c putgbn.f
/bin/rm -f w3fi74.o
gfortran -ffixed-form -O -fconvert=big-endian -frecord-marker=4 -c w3fi74.f
/bin/rm -f getgb1re.o
gfortran -ffixed-form -O -fconvert=big-endian -frecord-marker=4 -c getgb1re.f
/bin/rm -f getgbp.o
gfortran -ffixed-form -O -fconvert=big-endian -frecord-marker=4 -c getgbp.f
/bin/rm -f r63w72.o
gfortran -ffixed-form -O -fconvert=big-endian -frecord-marker=4 -c r63w72.f
/bin/rm -f w3fi75.o
gfortran -ffixed-form -O -fconvert=big-endian -frecord-marker=4 -c w3fi75.f
/bin/rm -f getgb1s.o
gfortran -ffixed-form -O -fconvert=big-endian -frecord-marker=4 -c getgb1s.f
/bin/rm -f getgi.o
gcc -D_UNDERSCORE -DBYTESWAP -DLINUX -DIO_NETCDF -DBIT32 -DNO_SIGNAL -D_MPI -c bacio.v1.3.c
/bin/rm -f errexit.o
gcc -D_UNDERSCORE -DBYTESWAP -DLINUX -DIO_NETCDF -DBIT32 -DNO_SIGNAL -D_MPI -c errexit.c
ar ru libw3.a bacio_module.o getgb.o getgbmh.o putgbex.o w3fi73.o getgb1r.o getgbmp.o putgbn.o w3fi74.o getgb1re.o getgbp.o r63w72.o w3fi75.o getgb1s.o getgi.o sbyte.o w3fi76.o getgbe.o getgir.o sbytes.o w3fi82.o getgbeh.o idsdef.o w3fi83.o getgbem.o iw3jdn.o w3difdat.o w3fs26.o getgbemh.o ixgb.o w3doxdat.o w3log.o getgbemp.o lengds.o w3fi01.o w3movdat.o getgbens.o pdsens.o w3fi58.o w3reddat.o getgbep.o pdseup.o w3fi59.o w3tagb.o errmsg.o getgbex.o putgb.o w3fi63.o gbytes.o getgbexm.o putgbe.o w3fi68.o gbytes_char.o getgbh.o putgben.o getbit.o getgbm.o putgbens.o w3fi72.o fparsei.o fparser.o instrument.o start.o summary.o w3utcdat.o w3fs21.o w3locdat.o w3fi71.o baciof.o bacio.v1.3.o errexit.o
ar: creating libw3.a
ranlib libw3.a
make[2]: Leaving directory `/home/mbhavana/Build_WRF/WPS/ungrib/src/ngl/w3'
ln -sf w3/libw3.a .
( cd g2 ; make -i -r DEV_TOP="/home/mbhavana/Build_WRF/WPS" all ; ranlib libg2_4.a )
make[2]: Entering directory `/home/mbhavana/Build_WRF/WPS/ungrib/src/ngl/g2'
Makefile:67: warning: overriding recipe for target `.F.o'
/home/mbhavana/Build_WRF/WPS/configure.wps:103: warning: ignoring old recipe for target `.F.o'
Makefile:72: warning: overriding recipe for target `.f.o'
/home/mbhavana/Build_WRF/WPS/configure.wps:99: warning: ignoring old recipe for target `.f.o'
Makefile:75: warning: overriding recipe for target `.c.o'
/home/mbhavana/Build_WRF/WPS/configure.wps:95: warning: ignoring old recipe for target `.c.o'
gfortran -c -ffixed-form -O -fconvert=big-endian -frecord-marker=4 gridtemplates.f
gfortran -c -ffixed-form -O -fconvert=big-endian -frecord-marker=4 pdstemplates.f
gfortran -c -ffixed-form -O -fconvert=big-endian -frecord-marker=4 drstemplates.f
gfortran -c -ffixed-form -O -fconvert=big-endian -frecord-marker=4 gribmod.f
gfortran -c -ffixed-form -O -fconvert=big-endian -frecord-marker=4 realloc.f
/usr/bin/cpp -P -traditional -DUSE_JPEG2000 -DUSE_PNG addfield.F > addfield.f90
gfortran -c -ffixed-form -O -fconvert=big-endian -frecord-marker=4 addfield.f90
/bin/rm -f addfield.f90
gfortran -c -ffixed-form -O -fconvert=big-endian -frecord-marker=4 addgrid.f
gfortran -c -ffixed-form -O -fconvert=big-endian -frecord-marker=4 addlocal.f
gfortran -c -ffixed-form -O -fconvert=big-endian -frecord-marker=4 getfield.f
gfortran -c -ffixed-form -O -fconvert=big-endian -frecord-marker=4 gb_info.f
gfortran -c -ffixed-form -O -fconvert=big-endian -frecord-marker=4 gf_getfld.f
gfortran -c -ffixed-form -O -fconvert=big-endian -frecord-marker=4 gf_free.f
gfortran -c -ffixed-form -O -fconvert=big-endian -frecord-marker=4 gf_unpack1.f
gfortran -c -ffixed-form -O -fconvert=big-endian -frecord-marker=4 gf_unpack2.f
gfortran -c -ffixed-form -O -fconvert=big-endian -frecord-marker=4 gf_unpack3.f
gfortran -c -ffixed-form -O -fconvert=big-endian -frecord-marker=4 gf_unpack4.f
gfortran -c -ffixed-form -O -fconvert=big-endian -frecord-marker=4 gf_unpack5.f
/usr/bin/cpp -P -traditional -DUSE_JPEG2000 -DUSE_PNG jpcpack.F > jpcpack.f90
gfortran -c -ffixed-form -O -fconvert=big-endian -frecord-marker=4 jpcpack.f90
/bin/rm -f jpcpack.f90
/usr/bin/cpp -P -traditional -DUSE_JPEG2000 -DUSE_PNG jpcunpack.F > jpcunpack.f90
gfortran -c -ffixed-form -O -fconvert=big-endian -frecord-marker=4 jpcunpack.f90
/bin/rm -f jpcunpack.f90
gcc -c -D_UNDERSCORE -DBYTESWAP -DLINUX -DIO_NETCDF -DBIT32 -DNO_SIGNAL -D_MPI -I/grib2/include -DUSE_JPEG2000 -DUSE_PNG -D__64BIT__ enc_jpeg2000.c
enc_jpeg2000.c:5:27: fatal error: jasper/jasper.h: No such file or directory
compilation terminated.
make[2]: [enc_jpeg2000.o] Error 1 (ignored)
gcc -c -D_UNDERSCORE -DBYTESWAP -DLINUX -DIO_NETCDF -DBIT32 -DNO_SIGNAL -D_MPI -I/grib2/include -DUSE_JPEG2000 -DUSE_PNG -D__64BIT__ dec_jpeg2000.c
dec_jpeg2000.c:5:27: fatal error: jasper/jasper.h: No such file or directory
compilation terminated.
make[2]: [dec_jpeg2000.o] Error 1 (ignored)
/usr/bin/cpp -P -traditional -DUSE_JPEG2000 -DUSE_PNG pngpack.F > pngpack.f90
gfortran -c -ffixed-form -O -fconvert=big-endian -frecord-marker=4 pngpack.f90
/bin/rm -f pngpack.f90
/usr/bin/cpp -P -traditional -DUSE_JPEG2000 -DUSE_PNG pngunpack.F > pngunpack.f90
gfortran -c -ffixed-form -O -fconvert=big-endian -frecord-marker=4 pngunpack.f90
/bin/rm -f pngunpack.f90
gcc -c -D_UNDERSCORE -DBYTESWAP -DLINUX -DIO_NETCDF -DBIT32 -DNO_SIGNAL -D_MPI -I/grib2/include -DUSE_JPEG2000 -DUSE_PNG -D__64BIT__ enc_png.c
gcc -c -D_UNDERSCORE -DBYTESWAP -DLINUX -DIO_NETCDF -DBIT32 -DNO_SIGNAL -D_MPI -I/grib2/include -DUSE_JPEG2000 -DUSE_PNG -D__64BIT__ dec_png.c
gfortran -c -ffixed-form -O -fconvert=big-endian -frecord-marker=4 gbytesc.f
gfortran -c -ffixed-form -O -fconvert=big-endian -frecord-marker=4 skgb.f
gfortran -c -ffixed-form -O -fconvert=big-endian -frecord-marker=4 params.f
gfortran -c -ffixed-form -O -fconvert=big-endian -frecord-marker=4 params_ecmwf.f
gcc -c -D_UNDERSCORE -DBYTESWAP -DLINUX -DIO_NETCDF -DBIT32 -DNO_SIGNAL -D_MPI -I/grib2/include -DUSE_JPEG2000 -DUSE_PNG -D__64BIT__ mova2i.c
/bin/rm -f libg2_4.a
ar ru libg2_4.a gridtemplates.o pdstemplates.o drstemplates.o gribmod.o realloc.o addfield.o addgrid.o addlocal.o getfield.o gb_info.o gf_getfld.o gf_free.o gf_unpack1.o gf_unpack2.o gf_unpack3.o gf_unpack4.o gf_unpack5.o gf_unpack6.o gf_unpack7.o gettemplates.o getlocal.o getdim.o getpoly.o gribcreate.o gribend.o gribinfo.o mkieee.o rdieee.o simpack.o simunpack.o cmplxpack.o compack.o misspack.o pack_gp.o reduce.o comunpack.o specpack.o specunpack.o jpcpack.o jpcunpack.o enc_jpeg2000.o dec_jpeg2000.o pngpack.o pngunpack.o enc_png.o dec_png.o gbytesc.o skgb.o ixgb2.o getidx.o getg2i.o getg2ir.o getgb2s.o getgb2r.o getgb2l.o getgb2.o getgb2p.o getgb2rp.o putgb2.o g2grids.o gdt2gds.o params.o params_ecmwf.o mova2i.o
ar: creating libg2_4.a
ar: enc_jpeg2000.o: No such file or directory
make[2]: [libg2_4.a] Error 1 (ignored)
ranlib libg2_4.a
ranlib: 'libg2_4.a': No such file
make[2]: [libg2_4.a] Error 1 (ignored)
make[2]: Leaving directory `/home/mbhavana/Build_WRF/WPS/ungrib/src/ngl/g2'
ranlib: 'libg2_4.a': No such file
make[1]: [g2/libg2_4.a] Error 1 (ignored)
ln -sf g2/libg2_4.a .
make[1]: Leaving directory `/home/mbhavana/Build_WRF/WPS/ungrib/src/ngl'
( cd src ; \
if [ "" = yes ] ; then \
WRF_DIR2=../WRFV3 ; \
else \
WRF_DIR2=/home/mbhavana/Build_WRF/WPS/../WRFV3 ; \
fi ; \
make -i -r ungrib.exe \
WRF_DIR="$WRF_DIR2" \
FC="gfortran" \
CC="mpicc -cc=gcc " \
CPP="/usr/bin/cpp -P -traditional" \
FFLAGS="-ffree-form -O -fconvert=big-endian -frecord-marker=4" \
CFLAGS="" \
LDFLAGS="" \
CPPFLAGS="-D_UNDERSCORE -DBYTESWAP -DLINUX -DIO_NETCDF -DBIT32 -DNO_SIGNAL -D_MPI -D_UNGRIB" )
make[1]: Entering directory `/home/mbhavana/Build_WRF/WPS/ungrib/src'
Makefile:90: warning: overriding recipe for target `.F.o'
../../configure.wps:103: warning: ignoring old recipe for target `.F.o'
Makefile:95: warning: overriding recipe for target `.c.o'
../../configure.wps:95: warning: ignoring old recipe for target `.c.o'
/usr/bin/cpp -P -traditional -D_UNDERSCORE -DBYTESWAP -DLINUX -DIO_NETCDF -DBIT32 -DNO_SIGNAL -D_MPI -D_UNGRIB -DUSE_JPEG2000 -DUSE_PNG misc_definitions_module.F > misc_definitions_module.f90
gfortran -c -ffree-form -O -fconvert=big-endian -frecord-marker=4 misc_definitions_module.f90
mpicc -cc=gcc -D_UNDERSCORE -DBYTESWAP -DLINUX -DIO_NETCDF -DBIT32 -DNO_SIGNAL -D_MPI -D_UNGRIB -c cio.c
cio.c:24:16: warning: return type defaults to ‘int’ [-Wimplicit-int]
#define c_open c_open_
^
cio.c:52:1: note: in expansion of macro ‘c_open’
c_open(unit, nunit, name, mode, err, oflag)
^
cio.c:27:17: warning: return type defaults to ‘int’ [-Wimplicit-int]
#define bn_seek bn_seek_
^
cio.c:117:1: note: in expansion of macro ‘bn_seek’
bn_seek(fd, bread, mode, iprint)
^
cio.c:26:17: warning: return type defaults to ‘int’ [-Wimplicit-int]
#define bn_read bn_read_
^
cio.c:155:1: note: in expansion of macro ‘bn_read’
bn_read(fd, buf, nbuf, bread, ios, idiag)
^
cio.c:201:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
bnwrit_(fd, buf, nbuf, bwritten, err, idiag)
^
cio.c:25:17: warning: return type defaults to ‘int’ [-Wimplicit-int]
#define c_close c_close_
^
cio.c:235:1: note: in expansion of macro ‘c_close’
c_close(nunit, iprint, err)
^
/bin/rm -f libpgu.a
ar ru libpgu.a build_hdate.o geth_newdate.o geth_idts.o swap.o table.o parse_table.o gbytesys.o gribcode.o read_namelist.o cio.o
ar: creating libpgu.a
ranlib libpgu.a
/bin/rm -f ungrib.exe
if [ -z ] ; then \
gfortran -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/grib2/lib -ljasper -lpng -lz \
-L. -lpgu ; \
else \
gfortran -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/grib2/lib -ljasper -lpng -lz \
libpgu.a ; \
fi
/usr/bin/ld: cannot find -lg2_4
/usr/bin/ld: cannot find -ljasper
collect2: error: ld returned 1 exit status
make[1]: [ungrib.exe] Error 1 (ignored)
make[1]: Leaving directory `/home/mbhavana/Build_WRF/WPS/ungrib/src'
if [ -h ungrib.exe ] ; then \
/bin/rm -f ungrib.exe ; \
fi ; \
if [ -h ../ungrib.exe ] ; then \
/bin/rm -f ../ungrib.exe ; \
fi ; \
if [ -e src/ungrib.exe ] ; then \
ln -sf src/ungrib.exe . ; \
fi
Bhavana Medisetti
 
Posts: 7
Joined: Fri Sep 01, 2017 7:33 am

Re: WPS 3.8.1 ungrib.exe cannot be compiled

Postby Bhavana Medisetti » Tue Oct 24, 2017 5:21 am

Sir,
I made some changes after that I got this error,

**** Compiling ungrib ****

( cd src/ngl ; make -i -r DEV_TOP="/home/mbhavana/Build_WRF/WPS" CC="gcc" FC="gfortran" RANLIB="ranlib " all )
make[1]: Entering directory `/home/mbhavana/Build_WRF/WPS/ungrib/src/ngl'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/mbhavana/Build_WRF/WPS/ungrib/src/ngl'
( cd src ; \
if [ "" = yes ] ; then \
WRF_DIR2=../WRFV3 ; \
else \
WRF_DIR2=/home/mbhavana/Build_WRF/WPS/../WRFV3 ; \
fi ; \
make -i -r ungrib.exe \
WRF_DIR="$WRF_DIR2" \
FC="gfortran" \
CC="mpicc -cc=gcc " \
CPP="/usr/bin/cpp -P -traditional" \
FFLAGS="-ffree-form -O -fconvert=big-endian -frecord-marker=4" \
CFLAGS="" \
LDFLAGS="" \
CPPFLAGS="-D_UNDERSCORE -DBYTESWAP -DLINUX -DIO_NETCDF -DBIT32 -DNO_SIGNAL -D_MPI -D_UNGRIB" )
make[1]: Entering directory `/home/mbhavana/Build_WRF/WPS/ungrib/src'
Makefile:90: warning: overriding recipe for target `.F.o'
../../configure.wps:103: warning: ignoring old recipe for target `.F.o'
Makefile:95: warning: overriding recipe for target `.c.o'
../../configure.wps:95: warning: ignoring old recipe for target `.c.o'
/bin/rm -f ungrib.exe
if [ -z ] ; then \
gfortran -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/home/mbhavana/Build_WRF/grib2/lib -ljasper -lpng -lz \
-L. -lpgu ; \
else \
gfortran -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/home/mbhavana/Build_WRF/grib2/lib -ljasper -lpng -lz \
libpgu.a ; \
fi
./ngl/libg2_4.a(dec_png.o): In function `dec_png_':
dec_png.c:(.text+0x16c): undefined reference to `png_set_longjmp_fn'
collect2: error: ld returned 1 exit status
make[1]: [ungrib.exe] Error 1 (ignored)
make[1]: Leaving directory `/home/mbhavana/Build_WRF/WPS/ungrib/src'
if [ -h ungrib.exe ] ; then \
/bin/rm -f ungrib.exe ; \
fi ; \
if [ -h ../ungrib.exe ] ; then \
/bin/rm -f ../ungrib.exe ; \
fi ; \
if [ -e src/ungrib.exe ] ; then \
ln -sf src/ungrib.exe . ; \
fi
~
~
~
~
~
~
~
~
please anyone help me to resolve this issue
Bhavana Medisetti
 
Posts: 7
Joined: Fri Sep 01, 2017 7:33 am

Re: WPS 3.8.1 ungrib.exe cannot be compiled

Postby kwthomas » Wed Oct 25, 2017 5:22 pm

The compaint about not finding jasper/jasper.h means that it isn't in the standard location, which is off of /usr/include.

If you build your version of JASPER in /home/kwt/jasper1.2.3, then you would need to add the line "-I/home/kwt/jasper1.2.3" to your compile lines. No spaces.

The missing"png_set_longjmp_fn" is because you are using an outdated version of libpng.
Kevin W. Thomas
Center for Analysis and Prediction of Storms
University of Oklahoma
kwthomas
 
Posts: 208
Joined: Thu Aug 07, 2008 6:53 pm


Return to Installation

Who is online

Users browsing this forum: Baidu [Spider], Google [Bot], Majestic-12 [Bot] and 5 guests

cron