Compilation of ARWpost with gfortran: Undefined symbols

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

Compilation of ARWpost with gfortran: Undefined symbols

Postby larrynewman » Fri Dec 02, 2011 7:03 am

I managed to compile WPS and WRF sucessfully on my Macbook Pro (Mac OS X 10.6.8). I did a test-run on both without any problems.

Afterwards I tried to compile ARWpost with gcc and gfortran (as i did for WPS and WRF) which failed. I also tried to use gcc and g95 giving me similar errors.

Has anyone an idea what may be the reason why the compilation of ARWpost with the following configuration fails?

Code: Select all
# configure.arwp
#
# This file was automatically generated by the configure script in the
# top level directory. You may make changes to the settings in this
# file but be aware they will be overwritten each time you run configure.
# Ordinarily, it is necessary to run configure once, when the code is
# first installed.
#
# To permanently change options, change the settings for your platform
# in the file arch/configure.defaults, the preamble, and the postamble -
# then rerun configure.
#

.SUFFIXES: .F90 .f90 .F .f .c .o

SHELL              =       /bin/sh

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

ARFLAGS         =   

PERL         =   perl

RANLIB         =   echo

#### Architecture specific settings ####

# Settings for Darwin, gfortran compiler      
#
FC      =   gfortran
FFLAGS          =       -ffree-form -O -fconvert=big-endian -frecord-marker=4
F77FLAGS        =       -ffixed-form -O -fconvert=big-endian -frecord-marker=4
FNGFLAGS   =   $(FFLAGS)
LDFLAGS      =   
CC      =   gcc
CFLAGS      =   
CPP      =   /usr/bin/cpp -C -P -traditional
CPPFLAGS   =   -D_UNDERSCORE -DBYTESWAP -DIO_NETCDF -DBIT32 -DMACOS -DNO_SIGNAL
RANLIB      =   

###########################################################
#
#   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


NETCDF = /usr/local/netcdf

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

#   There is probably no reason to modify these rules

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

.f90.o:
   $(RM) $@ $*.mod
   $(CP) $< $*.f
   $(FC) $(FFLAGS) -I${NETCDF}/include -c $*.f
   $(RM) $*.f

.F90.o:
   $(RM) $@ $*.mod
   $(CPP) $(CPPFLAGS) $(FDEFS) $< > $*.f
   $(FC) $(FFLAGS) -I${NETCDF}/include -c $*.f
   $(RM) $*.f


Log-File:

Code: Select all
form -O -fconvert=big-endian -frecord-marker=4 -I/usr/local/netcdf/include -c module_calc_slp.f
/bin/rm -f module_calc_slp.f
/bin/rm -f module_calc_dbz.o module_calc_dbz.mod
/bin/cp module_calc_dbz.f90 module_calc_dbz.f
gfortran -ffree-form -O -fconvert=big-endian -frecord-marker=4 -I/usr/local/netcdf/include -c module_calc_dbz.f
/bin/rm -f module_calc_dbz.f
/bin/rm -f module_calc_cape.o module_calc_cape.mod
/bin/cp module_calc_cape.f90 module_calc_cape.f
gfortran -ffree-form -O -fconvert=big-endian -frecord-marker=4 -I/usr/local/netcdf/include -c module_calc_cape.f
/bin/rm -f module_calc_cape.f
/bin/rm -f module_calc_wdir.o module_calc_wdir.mod
/bin/cp module_calc_wdir.f90 module_calc_wdir.f
gfortran -ffree-form -O -fconvert=big-endian -frecord-marker=4 -I/usr/local/netcdf/include -c module_calc_wdir.f
/bin/rm -f module_calc_wdir.f
/bin/rm -f module_calc_wspd.o module_calc_wspd.mod
/bin/cp module_calc_wspd.f90 module_calc_wspd.f
gfortran -ffree-form -O -fconvert=big-endian -frecord-marker=4 -I/usr/local/netcdf/include -c module_calc_wspd.f
/bin/rm -f module_calc_wspd.f
/bin/rm -f module_calc_clfr.o module_calc_clfr.mod
/bin/cp module_calc_clfr.f90 module_calc_clfr.f
gfortran -ffree-form -O -fconvert=big-endian -frecord-marker=4 -I/usr/local/netcdf/include -c module_calc_clfr.f
/bin/rm -f module_calc_clfr.f
/bin/rm -f module_diagnostics.o module_diagnostics.mod
/bin/cp module_diagnostics.f90 module_diagnostics.f
gfortran -ffree-form -O -fconvert=big-endian -frecord-marker=4 -I/usr/local/netcdf/include -c module_diagnostics.f
/bin/rm -f module_diagnostics.f
/bin/rm -f process_domain_module.o process_domain_module.mod
/usr/bin/cpp -C -P -traditional -D_UNDERSCORE -DBYTESWAP -DIO_NETCDF -DBIT32 -DMACOS -DNO_SIGNAL  process_domain_module.F90 > process_domain_module.f
gfortran -ffree-form -O -fconvert=big-endian -frecord-marker=4 -I/usr/local/netcdf/include -c process_domain_module.f
/bin/rm -f process_domain_module.f
/bin/rm -f ARWpost.o ARWpost.mod
/bin/cp ARWpost.f90 ARWpost.f
gfortran -ffree-form -O -fconvert=big-endian -frecord-marker=4 -I/usr/local/netcdf/include -c ARWpost.f
/bin/rm -f ARWpost.f
/bin/rm -f module_map_utils.o module_map_utils.mod
/bin/cp module_map_utils.f90 module_map_utils.f
gfortran -ffree-form -O -fconvert=big-endian -frecord-marker=4 -I/usr/local/netcdf/include -c module_map_utils.f
/bin/rm -f module_map_utils.f
gfortran -ffree-form -O -fconvert=big-endian -frecord-marker=4  -o ARWpost.exe module_model_basics.o constants_module.o gridinfo_module.o ARWpost.o input_module.o output_module.o module_map_utils.o misc_definitions_module.o module_date_pack.o module_debug.o process_domain_module.o module_get_file_names.o module_interp.o module_basic_arrays.o module_diagnostics.o module_arrays.o module_pressure.o module_calc_height.o module_calc_pressure.o module_calc_theta.o module_calc_tk.o module_calc_tc.o module_calc_td.o module_calc_td2.o module_calc_rh.o module_calc_rh2.o module_calc_uvmet.o module_calc_slp.o module_calc_dbz.o module_calc_cape.o module_calc_wdir.o module_calc_wspd.o module_calc_clfr.o  \
      -L/usr/local/netcdf/lib -I/usr/local/netcdf/include  -lnetcdf
Undefined symbols:
  "_ncvgt_", referenced from:
      ___input_module_MOD_read_next_field in input_module.o
      ___input_module_MOD_read_next_field in input_module.o
      ___input_module_MOD_read_next_field in input_module.o
      ___input_module_MOD_read_next_field in input_module.o
      ___module_interp_MOD_get_keep_array in module_interp.o
      ___module_interp_MOD_get_keep_array in module_interp.o
      ___module_interp_MOD_get_keep_array in module_interp.o
      ___module_interp_MOD_get_interp_array in module_interp.o
      ___module_interp_MOD_get_interp_array in module_interp.o
      ___module_interp_MOD_get_interp_array in module_interp.o
      ___module_interp_MOD_get_interp_array in module_interp.o
      ___module_interp_MOD_get_interp_array in module_interp.o
      ___module_interp_MOD_get_interp_array in module_interp.o
      ___module_interp_MOD_get_interp_array in module_interp.o
      ___module_interp_MOD_get_interp_array in module_interp.o
      ___module_interp_MOD_get_interp_array in module_interp.o
      ___module_interp_MOD_get_interp_info in module_interp.o
      ___module_interp_MOD_get_interp_info in module_interp.o
  "_nf_get_vara_text_", referenced from:
      ___input_module_MOD_arw_get_next_time in input_module.o
  "_nf_inq_var_", referenced from:
      ___input_module_MOD_arw_get_next_time in input_module.o
      ___input_module_MOD_read_next_field in input_module.o
      ___module_interp_MOD_get_keep_array in module_interp.o
      ___module_interp_MOD_get_interp_array in module_interp.o
      ___module_interp_MOD_get_interp_array in module_interp.o
      ___module_interp_MOD_get_interp_array in module_interp.o
      ___module_interp_MOD_get_interp_array in module_interp.o
      ___module_interp_MOD_get_interp_array in module_interp.o
      ___module_interp_MOD_get_interp_array in module_interp.o
      ___module_interp_MOD_get_interp_info in module_interp.o
  "_nf_inq_att_", referenced from:
      ___input_module_MOD_read_global_attrs in input_module.o
  "_nf_inq_attname_", referenced from:
      ___input_module_MOD_read_global_attrs in input_module.o
  "_nf_inq_dim_", referenced from:
      ___input_module_MOD_input_init in input_module.o
  "_nf_get_att_real_", referenced from:
      ___input_module_MOD_read_global_attrs in input_module.o
      ___input_module_MOD_read_global_attrs in input_module.o
      ___input_module_MOD_read_global_attrs in input_module.o
      ___input_module_MOD_read_global_attrs in input_module.o
      ___input_module_MOD_read_global_attrs in input_module.o
      ___input_module_MOD_read_global_attrs in input_module.o
      ___input_module_MOD_read_global_attrs in input_module.o
      ___input_module_MOD_read_global_attrs in input_module.o
      ___input_module_MOD_read_global_attrs in input_module.o
      ___input_module_MOD_read_global_attrs in input_module.o
      ___input_module_MOD_read_global_attrs in input_module.o
      ___input_module_MOD_read_global_attrs in input_module.o
      ___input_module_MOD_read_global_attrs in input_module.o
  "_nf_inq_", referenced from:
      ___input_module_MOD_input_init in input_module.o
  "_nf_inq_varid_", referenced from:
      ___input_module_MOD_arw_get_next_time in input_module.o
      ___module_interp_MOD_get_keep_array in module_interp.o
      ___module_interp_MOD_get_keep_array in module_interp.o
      ___module_interp_MOD_get_interp_array in module_interp.o
      ___module_interp_MOD_get_interp_array in module_interp.o
      ___module_interp_MOD_get_interp_array in module_interp.o
      ___module_interp_MOD_get_interp_array in module_interp.o
      ___module_interp_MOD_get_interp_array in module_interp.o
      ___module_interp_MOD_get_interp_array in module_interp.o
      ___module_interp_MOD_get_interp_array in module_interp.o
      ___module_interp_MOD_get_interp_array in module_interp.o
      ___module_interp_MOD_get_interp_array in module_interp.o
      ___module_interp_MOD_get_interp_array in module_interp.o
      ___module_interp_MOD_get_interp_array in module_interp.o
      ___module_interp_MOD_get_interp_info in module_interp.o
      ___module_interp_MOD_get_interp_info in module_interp.o
      ___module_interp_MOD_get_interp_info in module_interp.o
      ___module_interp_MOD_get_interp_info in module_interp.o
      ___module_interp_MOD_get_interp_info in module_interp.o
      ___module_interp_MOD_get_interp_info in module_interp.o
      ___module_interp_MOD_get_interp_info in module_interp.o
      ___module_interp_MOD_get_interp_info in module_interp.o
      ___module_interp_MOD_get_interp_info in module_interp.o
      ___module_interp_MOD_get_interp_info in module_interp.o
      ___module_interp_MOD_get_interp_info in module_interp.o
      ___module_interp_MOD_get_interp_info in module_interp.o
  "_nf_get_att_int_", referenced from:
      ___input_module_MOD_read_global_attrs in input_module.o
      ___input_module_MOD_read_global_attrs in input_module.o
      ___input_module_MOD_read_global_attrs in input_module.o
      ___input_module_MOD_read_global_attrs in input_module.o
      ___input_module_MOD_read_global_attrs in input_module.o
  "_nf_close_", referenced from:
      ___input_module_MOD_input_close in input_module.o
  "_nf_get_att_text_", referenced from:
      ___input_module_MOD_read_global_attrs in input_module.o
      ___input_module_MOD_read_global_attrs in input_module.o
      ___input_module_MOD_read_global_attrs in input_module.o
      ___input_module_MOD_read_next_field in input_module.o
      ___input_module_MOD_read_next_field in input_module.o
      ___input_module_MOD_read_next_field in input_module.o
      ___input_module_MOD_read_next_field in input_module.o
  "_nf_open_", referenced from:
      ___input_module_MOD_input_init in input_module.o
ld: symbol(s) not found
collect2: ld gab 1 als Ende-Status zurück
make: [ARWpost.exe] Error 1 (ignored)
larrynewman
 
Posts: 2
Joined: Fri Dec 02, 2011 6:57 am

Re: Compilation of ARWpost with gfortran: Undefined symbols

Postby kristian » Thu Dec 08, 2011 11:20 am

Hi larrynewman,

did you compile with the same compiler for netcdf and ARWpost? I remember that I had similar problems. Maybe some compiler flags are different for the configuration of netcdf and ARWpost?

Best regards,

Kristian
kristian
 
Posts: 7
Joined: Tue Feb 15, 2011 6:34 am

Re: Compilation of ARWpost with gfortran: Undefined symbols

Postby larrynewman » Fri Dec 09, 2011 5:13 am

Hi kristian,

thank's for the hint. I'll check this and report again afterwards.
larrynewman
 
Posts: 2
Joined: Fri Dec 02, 2011 6:57 am


Return to Installation

Who is online

Users browsing this forum: No registered users and 6 guests