[Wrf-users] WPP3.2 compilation error (undefined reference..........)

mmkamal at uwaterloo.ca mmkamal at uwaterloo.ca
Mon Jun 13 20:31:38 MDT 2011


Hi All,


This is the first time I am trying to compile WPP3.2 but could not  
succeed. I have successfully compiled (dmpar) and tested WRFV3.2.1  
using ifort and icc compiler (11.1.072) and trying to compile WPP  
using the same compiler serially. At the end of the compilation I am  
getting the following error:

================================================================================

ifort -free -O3 -xT -fp-model precise -assume byterecl -convert  
big_endian -fpe0 -g -traceback -Wl,-noinhibit-exec  -o  
../../exec/wrfpost.exe getVariable.o getIVariable.o getVariableB.o  
getIVariableN.o getVariableRSM.o  kinds_mod.o MASKS_mod.o SOIL_mod.o  
VRBLS2D_mod.o VRBLS3D_mod.o BNDLYR.o  BOUND.o  CALCAPE.o  CALDWP.o   
CALDRG.o CALHEL.o  CALLCL.o CALMCVG.o  CALMXW.o  CALPBL.o  
CALPBLREGIME.o CALPOT.o  CALPW.o  CALRH.o  CALRCH.o CALSTRM.o CALTAU.o  
CALTHTE.o CALVIS.o CALVOR.o CALWXT.o CALWXT_RAMER.o CALWXT_BOURG.o  
CALWXT_REVISED.o CALWXT_EXPLICIT.o CALWXT_DOMINANT.o CLDRAD.o  CLMAX.o  
COLLECT.o  COLLECT_LOC.o DEWPOINT.o FDLVL.o  FIXED.o  FRZLVL.o   
FRZLVL2.o GET_BITS.o  GRIBIT.o INITPOST.o LFMFLD.o  INITPOST_BIN.o  
MISCLN.o MIXLEN.o MDL2P.o MDLFLD.o MSFPS.o MPI_FIRST.o  MPI_LAST.o  
NGMFLD.o NGMSLP.o  OTLFT.o OTLIFT.o SLP_new.o SLP_NMM.o EXCH.o  
PARA_RANGE.o  POSTDATA.o  PROCESS.o INITPOST_NMM.o EXCH2.o READCNTRL.o  
  SCLFLD.o  SERVER.o  SETUP_SERVERS.o SURFCE.o SPLINE.o  TABLE.o   
TABLEQ.o   TRANSPORTWIND.o TRPAUS.o  TTBLEX.o WETBULB.o WRFPOST.o  
INITPOST_NMM_BIN.o CALMICT.o MICROINIT.o GPVS.o MDL2SIGMA.o ETCALC.o  
CANRES.o CALGUST.o WETFRZLVL.o SNFRAC.o SNFRAC_GFS.o MDL2AGL.o  
INITPOST_RSM.o AVIATION.o  DEALLOCATE.o    
/scratch/mkamal/WRF/WPPV3/../WRFV3/frame/module_internal_header_util.o  
/scratch/mkamal/WRF/WPPV3/../WRFV3/frame/pack_utils.o  
/scratch/mkamal/WRF/WPPV3/../WRFV3/frame/wrf_debug.o  
/scratch/mkamal/WRF/WPPV3/../WRFV3/frame/module_wrf_error.o  
-L/scratch/mkamal/WRF/WPPV3/../WRFV3/external/io_int -lwrfio_int  
/scratch/mkamal/WRF/WPPV3/../WRFV3/main/libwrflib.a  
-L/scratch/mkamal/WRF/WPPV3/../WRFV3/external/fftpack/fftpack5  
-lfftpack -L/scratch/mkamal/WRF/WPPV3/../WRFV3/external/io_netcdf  
-lwrfio_nf -L/scratch/mkamal/WRF/WPPV3/../WRFV3/external/RSL_LITE  
-lrsl_lite -L/scratch/mkamal/WRF/WPPV3/../WRFV3/external/io_grib1  
-lio_grib1 -L/scratch/mkamal/WRF/WPPV3/../WRFV3/external/io_grib_share  
-lio_grib_share  
-L/scratch/mkamal/WRF/WPPV3/../WRFV3/external/esmf_time_f90  
-lesmf_time -L/scratch/mkamal/WRF/WPPV3/../WRFV3/external/io_netcdf  
-lwrfio_nf   ../../lib/libw3.a ../../lib/libmpi.a  
-L/scratch/mkamal/WRF/WPPV3/netcdf_links/lib -lnetcdf
/scratch/mkamal/WRF/WPPV3/../WRFV3/main/libwrflib.a(collect_on_comm.o): In  
function `collect_on_comm_':
collect_on_comm.c:(.text+0x26): undefined reference to `MPI_Comm_f2c'
collect_on_comm.c:(.text+0x79): undefined reference to `ompi_mpi_int'
collect_on_comm.c:(.text+0x27a): undefined reference to `ompi_mpi_char'
collect_on_comm.c:(.text+0x307): undefined reference to `ompi_mpi_comm_world'
/scratch/mkamal/WRF/WPPV3/../WRFV3/main/libwrflib.a(collect_on_comm.o): In  
function `collect_on_comm0_':
collect_on_comm.c:(.text+0x344): undefined reference to `MPI_Comm_f2c'
collect_on_comm.c:(.text+0x391): undefined reference to `ompi_mpi_int'
collect_on_comm.c:(.text+0x592): undefined reference to `ompi_mpi_char'
collect_on_comm.c:(.text+0x622): undefined reference to `ompi_mpi_comm_world'
/scratch/mkamal/WRF/WPPV3/../WRFV3/main/libwrflib.a(collect_on_comm.o): In  
function `col_on_comm':
'
'
'
'
'
'
'
'
f_xpose.f:(.text+0x177d): undefined reference to `mpi_alltoallv_'
/scratch/mkamal/WRF/WPPV3/../WRFV3/external/RSL_LITE/librsl_lite.a(f_xpose.o):  
In function `trans_x2y_':
f_xpose.f:(.text+0x2be2): undefined reference to `mpi_alltoallv_'
f_xpose.f:(.text+0x30e3): undefined reference to `mpi_alltoallv_'
make[2]: Leaving directory `/scratch/mkamal/WRF/WPPV3/sorc/wrfpost'
make[1]: Leaving directory `/scratch/mkamal/WRF/WPPV3/sorc'

===============================================================
configure.wpp
===============================================================
SHELL           	=       /bin/sh

# Listing of options that are usually independent of machine type.
# When necessary, these are over-ridden by each architecture.

ARFLAGS			=

#### Architecture specific settings ####

# Settings for Linux x86_64, Intel compiler	 (serial)#
LDFLAGS         =     -Wl,-noinhibit-exec

SFC=ifort
SF90=ifort -free
SCC=icc
FFLAGS=-O3 -xT -fp-model precise -assume byterecl -convert big_endian  
-fpe0 -g -traceback $(LDFLAGS)

DM_FC=ifort
DM_F90=ifort -free
DM_CC=icc

FC              =       $(SFC)
F90             =       $(SF90)
CC              =       $(SCC)

CFLAGS=-O0 -DLINUX

###########################################################
#
#	Macros, these should be generic for all machines

LN		=	ln -sf
MAKE		=	make -i -r
RM		= 	/bin/rm -f
CP		= 	/bin/cp
AR		=	ar ru

WRF_INCLUDE  = -I$(WRF_DIR)/frame

WRF_LIB         =	$(WRF_DIR)/frame/module_internal_header_util.o \
			$(WRF_DIR)/frame/pack_utils.o \
			$(WRF_DIR)/frame/wrf_debug.o \
			$(WRF_DIR)/frame/module_wrf_error.o \
			-L$(WRF_DIR)/external/io_int -lwrfio_int \
			$(WRF_DIR)/main/libwrflib.a \
			-L$(WRF_DIR)/external/fftpack/fftpack5 -lfftpack \
			-L$(WRF_DIR)/external/io_netcdf -lwrfio_nf \
			-L$(WRF_DIR)/external/RSL_LITE -lrsl_lite \
			-L$(WRF_DIR)/external/io_grib1 -lio_grib1 \
			-L$(WRF_DIR)/external/io_grib_share -lio_grib_share \
			-L$(WRF_DIR)/external/esmf_time_f90 -lesmf_time \
			-L$(WRF_DIR)/external/io_netcdf -lwrfio_nf
WRF_LIB2        =
NETCDFPATH      =    /scratch/mkamal/WRF/WPPV3/netcdf_links
NETCDFLIBS      =     -lnetcdf
WRF_DIR         =    /scratch/mkamal/WRF/WPPV3/../WRFV3
COMMS_ADD_OBJ   =
COMMS_ADD_OBJST =
COMMS_LIB       =    libmpi.a
MAIN_OBJ        =    WRFPOST.o



.IGNORE:
.SUFFIXES: .c .f .F .o

#	There is probably no reason to modify these rules

.c.o:
	$(RM) $@
	$(CC) $(CPPFLAGS) $(CFLAGS) -c $<

.f.o:
	$(RM) $@ $*.mod
	$(FC) $(F77FLAGS) -c $< $(WRF_INCLUDE)

.F.o:
	$(RM) $@ $*.mod
	$(CPP) $(CPPFLAGS) $(FDEFS) $(WRF_INCLUDE) $< > $*.f90
	$(FC) $(FFLAGS) -c $*.f90 $(WRF_INCLUDE)
#	$(RM) $*.f90

======================================================================
confuguration.wrf
======================================================================

#### Architecture specific settings ####

# Settings for Linux x86_64 i486 i586 i686, ifort compiler with icc  (dmpar)

DMPARALLEL      =        1
OMPCPP          =       # -D_OPENMP
OMP             =       # -openmp -fpp -auto
OMPCC           =       # -openmp -fpp -auto
SFC             =       ifort
SCC             =       icc
CCOMP           =       icc
DM_FC           =       mpif90 #  -f90=$(SFC)
DM_CC           =       mpicc -DMPI2_SUPPORT # -cc=$(SCC)
FC              =        $(DM_FC)
CC              =       $(DM_CC) -DFSEEKO64_OK
LD              =       $(FC)
RWORDSIZE       =       $(NATIVE_RWORDSIZE)
PROMOTION       =       -i4
ARCH_LOCAL      =       -DNONSTANDARD_SYSTEM_FUNC
CFLAGS_LOCAL    =       -w -O3 -ip
LDFLAGS_LOCAL   =       -ip
CPLUSPLUSLIB    =
ESMF_LDFLAG     =       $(CPLUSPLUSLIB)
FCOPTIM         =       -O3
FCREDUCEDOPT	=       $(FCOPTIM)
FCNOOPT		=       -O0 -fno-inline -fno-ip
FCDEBUG         =       # -g $(FCNOOPT) -traceback
FORMAT_FIXED    =       -FI
FORMAT_FREE     =       -FR
FCSUFFIX        =
BYTESWAPIO      =       -convert big_endian
FCBASEOPTS_NO_G =       -w -ftz -align all -fno-alias -fp-model  
precise $(FORMAT_FREE) $(BYTESWAPIO)
FCBASEOPTS      =       $(FCBASEOPTS_NO_G) $(FCDEBUG)
MODULE_SRCH_FLAG =
TRADFLAG        =      -traditional
CPP             =      /lib/cpp -C -P
AR              =      ar
ARFLAGS         =      ru
M4              =      m4
RANLIB          =      ranlib
CC_TOOLS        =      $(SCC)

###########################################################
######################
# POSTAMBLE

FGREP = fgrep -iq

ARCHFLAGS       =    $(COREDEFS) -DIWORDSIZE=$(IWORDSIZE)  
-DDWORDSIZE=$(DWORDSIZE) -DRWORDSIZE=$(RWORDSIZE)  
-DLWORDSIZE=$(LWORDSIZE) \
                      $(ARCH_LOCAL) \
                      $(DA_ARCHFLAGS) \
                       -DDM_PARALLEL \
                        \
                       -DNETCDF \
                        \
                        \
                        \
                        \
                        \
                        \
                       -DUSE_ALLOCATABLES \
                       -DGRIB1 \
                       -DINTIO \
                       -DLIMIT_ARGS \
                       -DCONFIG_BUF_LEN=$(CONFIG_BUF_LEN) \
                       -DMAX_DOMAINS_F=$(MAX_DOMAINS) \
                       -DMAX_HISTORY=$(MAX_HISTORY) \
		      -DNMM_NEST=$(WRF_NMM_NEST)
CFLAGS          =    $(CFLAGS_LOCAL) -DDM_PARALLEL  \
                       -DMAX_HISTORY=$(MAX_HISTORY)
FCFLAGS         =    $(FCOPTIM) $(FCBASEOPTS)
ESMF_LIB_FLAGS  =
  ESMF_IO_LIB     =     
$(WRF_SRC_ROOT_DIR)/external/esmf_time_f90/libesmf_time.a
ESMF_IO_LIB_EXT =     
-L$(WRF_SRC_ROOT_DIR)/external/esmf_time_f90/libesmf_time.a
INCLUDE_MODULES =    $(MODULE_SRCH_FLAG) \
                      $(ESMF_MOD_INC) $(ESMF_LIB_FLAGS) \
                       -I$(WRF_SRC_ROOT_DIR)/main \
                       -I$(WRF_SRC_ROOT_DIR)/external/io_netcdf \
                       -I$(WRF_SRC_ROOT_DIR)/external/io_int \
                       -I$(WRF_SRC_ROOT_DIR)/frame \
                       -I$(WRF_SRC_ROOT_DIR)/share \
                       -I$(WRF_SRC_ROOT_DIR)/phys \
                       -I$(WRF_SRC_ROOT_DIR)/chem -I$(WRF_SRC_ROOT_DIR)/inc \
                       -I$(NETCDFPATH)/include \
                        \

REGISTRY        =    Registry

  LIB_BUNDLED     = \
                        
$(WRF_SRC_ROOT_DIR)/external/fftpack/fftpack5/libfftpack.a \
                       $(WRF_SRC_ROOT_DIR)/external/io_grib1/libio_grib1.a \
                        
$(WRF_SRC_ROOT_DIR)/external/io_grib_share/libio_grib_share.a \
                       $(WRF_SRC_ROOT_DIR)/external/io_int/libwrfio_int.a \
                       $(ESMF_IO_LIB) \
                       $(WRF_SRC_ROOT_DIR)/external/RSL_LITE/librsl_lite.a \
                        
$(WRF_SRC_ROOT_DIR)/frame/module_internal_header_util.o \
                       $(WRF_SRC_ROOT_DIR)/frame/pack_utils.o

  LIB_EXTERNAL    = \
                        
$(WRF_SRC_ROOT_DIR)/external/io_netcdf/libwrfio_nf.a  
-L/scinet/gpc/Libraries/netcdf-4.0.1_nc3_intel/lib  -lnetcdf

LIB             =    $(LIB_BUNDLED) $(LIB_EXTERNAL) $(LIB_LOCAL)
LDFLAGS         =    $(OMP) $(FCFLAGS) $(LDFLAGS_LOCAL)
ENVCOMPDEFS     =
WRF_CHEM	=	0
CPPFLAGS        =    $(ARCHFLAGS) $(ENVCOMPDEFS) -I$(LIBINCLUDE) $(TRADFLAG)
NETCDFPATH      =    /scinet/gpc/Libraries/netcdf-4.0.1_nc3_intel
PNETCDFPATH     =

bundled:  wrf_ioapi_includes wrfio_grib_share wrfio_grib1 wrfio_int  
esmf_time fftpack
external:  wrfio_nf    
$(WRF_SRC_ROOT_DIR)/external/RSL_LITE/librsl_lite.a gen_comms_rsllite  
module_dm_rsllite $(ESMF_TARGET)

=========================================================================


Has anyone any idea on how to solve this.


Thanks in advance
Kamal











More information about the Wrf-users mailing list