NCAR etc. WRF (weather forecast and research model) compile

Trying to compile WRF model on an Intel processor, REd Hat Linux machine with pgi 6. Having very limited success (as in, it seems that calls to C routines from fortran code may be an issue here). Here is an excerpt from a post on the WRF forum:

“I am trying to compile WRF 2.1 on a Intel Xeon single processor,
with the latest pgi compilers (6.0), Red Hat Linux 2.6.9-11.ELsmp
(Enterprise release 4, Nahant update 2). netCDF has recently been
installed and compiled with the same compilers with /usr/local/include and
/usr/local/lib as the include and library paths. I cannot compile WRF2.1
em idealized cases (or maybe anything else for that matter - all I’ve
been trying is the ideal cases for now). I was able to compile WRF2.0
cases without any trouble or special massaging of things. Would you
happen to have a configure.wrf file (and any appropriately modified
Makefile, secrets to where to put libraries and links to them, etc e.g.)
that I could go by to successfully compile given the above?”

Here are error messages:

pgf90 -w -byteswapio -Mfree -tp p6 -I. -I…/ioapi_share -c io_int.f
/bin/rm -f module_internal_header_util.o
/bin/rm -f intio_tags.h
/bin/rm -f libwrfio_int.a
ar cr libwrfio_int.a io_int.o
ranlib libwrfio_int.a
if [ -f …/…/frame/pack_utils.o ] ; then
mv diffwrf.F diffwrf.F90 ;
/lib/cpp -C -P -traditional diffwrf.F90 > diffwrf.f ;
pgf90 -w -byteswapio -Mfree -tp p6 -c -I…/ioapi_share
diffwrf.f ;
mv diffwrf.F90 diffwrf.F ;
pgf90 -w -byteswapio -Mfree -tp p6 -o diffwrf
diffwrf.o io_int.o
…/…/frame/module_wrf_error.o ; fi

… or …


pgf90 -w -byteswapio -Mfree -tp p6 -c
-I/mistral/home/michaejs/WRFV2/netcdf_links/include -I…/ioapi_share
diffwrf is being built now.
diffwrf.o(.text+0x53c): In function MAIN_': : undefined reference to set_wrf_debug_level_’
wrf_io.o(.text+0x2b2): In function
ext_ncd_support_routines_allochandle_': : undefined reference to wrf_debug_’
wrf_io.o(.text+0x4b9): In function
ext_ncd_support_routines_allochandle_': : undefined reference to wrf_debug_’
wrf_io.o(.text+0x6c0): In function
ext_ncd_support_routines_allochandle_': : undefined reference to wrf_debug_’

etc etc.

Does anyone have any ideas of what the issue(s) might be and how to correct them?

io_int.o(.text+0x96): In function
module_ext_internal_int_get_fresh_handle_': : undefined reference to wrf_error_fatal_’
io_int.o(.text+0x147): In function
module_ext_internal_init_module_ext_internal_': : undefined reference to wrf_sizeof_integer_’
io_int.o(.text+0x154): In function

Hi Mish -

Can you post your configure.wrf file? That will allow the apps guys to spot where it may differ from what we use.


Hi Mish,

The undefined references are from objects in the “libwrflib.a” library. So either this library is not being included on the link line or some of the library’s objects were not built. Can you look higher in your compile log to see if the there were any other errors? When you configured WRF, what option did you select?

Note that we have a tips page for building WRF (See It’s a bit old but is still valid for WRF 2.1. I just used it and successfully built WRF2.1 with PGI 6.0 on a Xeon.