ungrib from WPSV3.9.0.1 does not compile while WPSV3.9 does

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

ungrib from WPSV3.9.0.1 does not compile while WPSV3.9 does

Postby giaiottid » Wed Jul 19, 2017 5:04 am

In compiling WPSV3.9.0.1 metgrid and geogrid compile, while ungrib does not while, with the same configuration file, all the three WPS executables are generated in version WPSV3.9

The environment is as follow:
[operative@access wrf3.9]$ uname -a
Linux access.nfs 2.6.32-358.11.1.el6.x86_64 #1 SMP Wed Jun 12 03:34:52 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

And compiler and libraries are:
Currently Loaded Modulefiles:
1) pgi/15.7 3) hdf5/1.8.15/pgi 5) jasper/1.701.0/pgi 7) libpng/1.2.12/pgi
2) openmpi/1.10.0/pgi/15.7 4) netcdf/4.3.3.1/pgi 6) zlib/1.2.8/pgi

Making differences in the standard output messages generated during both compilations the problem seem to be:

Code: Select all
[operative@access WPS]$ diff ../WPSV3.9.0.1/compile_ungrib.log ../WPSV3.9/compile_ungrib.log
187d186
< pgf90 -c -Mfixed -byteswapio -O intmath.f
214,217d212
< PGF90-S-0155-Intrinsic not supported in initialization: scale (mkieee.f: 35)
< PGF90-S-0155-Intrinsic not supported in initialization: scale (mkieee.f: 36)
<   0 inform,   0 warnings,   2 severes, 0 fatal for mkieee
< make[2]: [mkieee.o] Error 2 (ignored)
219,222d213
< PGF90-S-0155-Intrinsic not supported in initialization: scale (rdieee.f: 35)
< PGF90-S-0155-Intrinsic not supported in initialization: scale (rdieee.f: 36)
<   0 inform,   0 warnings,   2 severes, 0 fatal for rdieee
< make[2]: [rdieee.o] Error 2 (ignored)
268c259
< ar ru  libg2_4.a gridtemplates.o pdstemplates.o drstemplates.o gribmod.o realloc.o intmath.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 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
270,271d260
< ar: mkieee.o: No such file or directory
< make[2]: [libg2_4.a] Error 1 (ignored)
371,372c360,361
< /usr/bin/ld: cannot find -lg2_4
< make[1]: [ungrib.exe] Error 2 (ignored)
---
> /opt/jasper/1.701.0/pgi/lib/libjasper.a(jas_stream.o): In function `jas_stream_tmpfile':
> /root/eXact/skyglobe/jasper-1.701.0/src/libjasper/base/./jas_stream.c:368: warning: the use of `tmpnam' is dangerous, better use `mkstemp'


Any suggestion on how to fix the problem is welcome.
Bye,
Dario
Dario B. Giaiotti

ARPA FVG - CRMA
Centro Regionale di Modellistica Ambientale
Via Cairoli, 14
I-33057 Palmanova (UD)
ITALY
Room I/20/U
Tel +39 0432 191 8048
Certified e-mail - PEC arpa@certregione.fvg.it
e-mail dario.giaiotti@arpa.fvg.it
giaiottid
 
Posts: 6
Joined: Fri Oct 30, 2009 7:33 am

Re: ungrib from WPSV3.9.0.1 does not compile while WPSV3.9 d

Postby giaiottid » Wed Jul 19, 2017 6:19 am

Solved.

The problem is that the compiler we are using (PGI suite 15.7) does not support the intrinsic function scale: see errors in stdout log file PGF90-S-0155-Intrinsic not supported in initialization: scale.

In the WPS version WPSV3.9.0.1, that intrinsic function is used in two routines, namely:

./ungrib/src/ngl/g2/rdieee.f
./ungrib/src/ngl/g2/mkieee.f

but in the version WPSV3.9 it is not. The differences between the routimne in the two WPS versions are only in the use of the intrinsic. In fact for mkieee.f here are the differeces

Code: Select all
[operative@access WPS]$ diff  ./ungrib/src/ngl/g2/mkieee.f ./ungrib/src/ngl/g2/mkieee.f.v9.0.1
35,43c35,36
<       real,save :: two23
<       real,save :: two126
<       integer,save :: once=0
<
<       if ( once .EQ. 0 ) then
<          once=1
<          two23=scale(1.0,23)
<          two126=scale(1.0,126)
<       endif
---
>       real, parameter :: two23=scale(1.0,23)
>       real, parameter :: two126=scale(1.0,126)


while for rdieee.f are:

Code: Select all
[operative@access WPS]$ diff  ./ungrib/src/ngl/g2/rdieee.f ./ungrib/src/ngl/g2/rdieee.f.v9.0.1
35,43c35,36
<       real,save :: two23
<       real,save :: two126
<       integer,save :: once=0
<
<       if ( once .EQ. 0 ) then
<          once=1
<          two23=scale(1.0,-23)
<          two126=scale(1.0,-126)
<       endif
---
>       real,parameter :: two23=scale(1.0,-23)
>       real,parameter :: two126=scale(1.0,-126)


So the workaround I adopted is to replace the sources

./ungrib/src/ngl/g2/rdieee.f
./ungrib/src/ngl/g2/mkieee.f

of the version WPSV3.9, in the WPSV3.9.0.1.

The compilation was successful and the ungrib.exe genrated.

I hope this would help some others.

Bye
Dario
Dario B. Giaiotti

ARPA FVG - CRMA
Centro Regionale di Modellistica Ambientale
Via Cairoli, 14
I-33057 Palmanova (UD)
ITALY
Room I/20/U
Tel +39 0432 191 8048
Certified e-mail - PEC arpa@certregione.fvg.it
e-mail dario.giaiotti@arpa.fvg.it
giaiottid
 
Posts: 6
Joined: Fri Oct 30, 2009 7:33 am

Re: ungrib from WPSV3.9.0.1 does not compile while WPSV3.9 d

Postby leuthold » Fri Jul 21, 2017 5:49 pm

It helped me. Thanks.
Mike
leuthold
 
Posts: 11
Joined: Mon Mar 23, 2009 5:27 pm


Return to Installation

Who is online

Users browsing this forum: No registered users and 6 guests