[Wrf-users] problems building wrfpost (WPP) version 3

Eric Altshuler ela at cola.iges.org
Mon Apr 21 22:46:32 MDT 2008


Hello,

I am trying to build wrfpost (WPP) version 3 on a Linux machine with Intel compilers. After running configure, I am using the default makefile (the only change I have made is to use -xP instead of -xT in FFLAGS). The build is successful until the linking phase when wrfpost.exe is supposed to be created. I get dozens of error messages about undefined references, all having to do with MPI routines, despite the fact that the default build for wrfpost on Linux systems is serial and uses 'stub' MPI routines from the library 'libmpi.a'. The first few error messages involve libwrflib.a:

/data/cfs2/data/wrf/WRFV3/main/libwrflib.a(collect_on_comm.o): In function `dst_on_comm':
collect_on_comm.c:(.text+0x21): undefined reference to `MPI_Comm_f2c'
collect_on_comm.c:(.text+0x81): undefined reference to `ompi_mpi_int'
collect_on_comm.c:(.text+0x90): undefined reference to `ompi_mpi_int'
collect_on_comm.c:(.text+0x11a): undefined reference to `ompi_mpi_char'
/data/cfs2/data/wrf/WRFV3/main/libwrflib.a(collect_on_comm.o): In function `dist_on_comm0_':
collect_on_comm.c:(.text+0x177): undefined reference to `MPI_Comm_f2c'
collect_on_comm.c:(.text+0x1c5): undefined reference to `ompi_mpi_int'
collect_on_comm.c:(.text+0x1d4): undefined reference to `ompi_mpi_int'
collect_on_comm.c:(.text+0x257): undefined reference to `ompi_mpi_char'
/data/cfs2/data/wrf/WRFV3/main/libwrflib.a(collect_on_comm.o): In function `dist_on_comm_':
collect_on_comm.c:(.text+0x2b7): undefined reference to `MPI_Comm_f2c'
collect_on_comm.c:(.text+0x309): undefined reference to `ompi_mpi_int'
collect_on_comm.c:(.text+0x318): undefined reference to `ompi_mpi_int'
collect_on_comm.c:(.text+0x3a2): undefined reference to `ompi_mpi_char'
...
...

There are also many error messages of similar type for librsl_lite.a:

/data/cfs2/data/wrf/WRFV3/external/RSL_LITE/librsl_lite.a(c_code.o): In function `rsl_lite_exch_x_':
c_code.c:(.text+0x69): undefined reference to `MPI_Comm_f2c'
c_code.c:(.text+0xc9): undefined reference to `ompi_mpi_char'
c_code.c:(.text+0x107): undefined reference to `ompi_mpi_char'
c_code.c:(.text+0x13e): undefined reference to `ompi_mpi_char'
c_code.c:(.text+0x175): undefined reference to `ompi_mpi_char'
/data/cfs2/data/wrf/WRFV3/external/RSL_LITE/librsl_lite.a(c_code.o): In function `rsl_lite_exch_y_':
c_code.c:(.text+0x219): undefined reference to `MPI_Comm_f2c'
c_code.c:(.text+0x276): undefined reference to `ompi_mpi_char'
c_code.c:(.text+0x2b4): undefined reference to `ompi_mpi_char'
c_code.c:(.text+0x2eb): undefined reference to `ompi_mpi_char'
c_code.c:(.text+0x322): undefined reference to `ompi_mpi_char'
...
...

These two libraries being linked are built in WRFV3. I successfully built and ran WRFV3 (DM parallel build) with Intel compilers and Open MPI, and I also had no problem building WPS (serial) and ARWpost. I suspect the problem in wrfpost is this: even though it is not using 'real' MPI, it links with libraries which contain routines that do make MPI calls, but the MPI routines themselves are not being loaded because wrfpost is not using the MPI compiler wrappers (which shouldn't be necessary for a serial build!) Is there a way to tell the linker to ignore those routines in a library that are never actually called in the program?

In contrast, I was able to build and run wrfpost on the same system using PGI compilers (I built WRFV3 with PGI and MPICH2). But our IT department is looking to migrate to Intel and Open MPI, so I need to get all components of WRF working with this combination.

There are two possible solutions to this problem:

a) build wrfpost as serial code and fix the problem with undefined references
b) build wrfpost as parallel code

The WRF Users Guide mentions that wrfpost can be run in parallel, but unfortunately it does not explain how to change the Linux makefile to enable this. I am looking for advice on how to do a) or b) above (having both options would be even better).

Thanks in advance for your feedback.

Best regards,

Eric L. Altshuler
Assistant Research Scientist
Center for Ocean-Land-Atmosphere Studies
4041 Powder Mill Road, Suite 302
Calverton, MD 20705-3106
USA

E-mail: ela at cola.iges.org
Phone: (301) 902-1257
Fax: (301) 595-9793



More information about the Wrf-users mailing list