[Met_help] vx_met_util Library error

John Halley Gotway johnhg at rap.ucar.edu
Wed Jan 9 14:13:45 MST 2008


Luke,

My fault again.  I apologize.  I see that you're using the PGI compilers, so you're probably using the Makefile_pgi file in the top-level MET directory.  It appears that I failed to update that
Makefile with the changes that were made to the standard Makefile for use with the GNU compilers.

Please replace the Makefile_pgi in the top-level directory of MET with the attached version of Makefile_pgi.  And then you'll have to re-customize it to the paths your using.

You're exactly right that it's a problem with the f2c library.  This updated version of the Makefile defines a variable named F2C_LIBNAME which is used by the makefile for pb2nc.  The old version of
Makefile_pgi failed to define that variable.

I'm posting all the known problems for this build to the MET website.  I'll add this one as well.

Please let me know how this works for you.  I want to verify that the fix was successful.

Thanks,
John

LBI
Luke Peffers wrote:
> Ok, that fixed my vx_met_util library problem.  Now I am having a problem
> making my pb2nc application.  I recall that this was problem with METv0.9,
> however, we fixed that by installing libf2c on my machine.  I have attached
> the make.log file with this error.
> 
> Thanks for the help!
> 
> Luke Peffers
> 
> On Jan 9, 2008 2:18 PM, Luke Peffers <luke.peffers at gmail.com> wrote:
> 
>> Thank you!  I will try this now but *please* be aware that I may have
>> accidentally removed something from the Makefile.   I don't want you to
>> assume that the mistake is on your end.
>>
>> Luke
>>
>> On Jan 9, 2008 1:27 PM, John Halley Gotway <johnhg at rap.ucar.edu> wrote:
>>
>>> Luke,
>>>
>>> It appears that I left out a NETCDF_INCS that should have been in the
>>> Makefile for the vx_met_util library.  I tested this out prior to releasing
>>> version 1.0 to try to catch all of the compilation
>>> dependencies, but I must have missed one.  Sorry about that.
>>>
>>> Please use the attached Makefile to replace the Makefile in the
>>> ..../METv1.0/lib/vx_met_util directory.  The only difference is adding
>>> $(NETCDF_INCS) to the "read_grib.o" line.
>>>
>>> Then try to rebuild MET.  Please let me know if that does the trick or
>>> if you run into any more compilation problems.
>>>
>>> I'll work on posting this fix to the MET website.
>>>
>>> Thanks!
>>> John
>>>
>>> Luke Peffers wrote:
>>>> Hello, I am trying to install METv1.0 and am having a problem with the
>>>> following Library build.  I have been using METv0.9 since its release
>>> with
>>>> no problems.  I have tried making METv1.0 using PGI and other
>>> compilers but
>>>> always get the same error (netcdf.hh file cannot be opened).
>>>>
>>>> Please help!
>>>>
>>>> Luke Peffers
>>>> FSU Meteorology
>>>>
>>>>
>>>> *** Making vx_met_util Library ***
>>>>
>>>> /usr/bin/g++ read_grib.cc -g -Wall -Wshadow -static  -c -I..
>>>> -I/fuelberg/r0/lpeffers/MET_9/GSL/gsl- 1.9-I
>>> /fuelberg/r0/lpeffers/MET_9/GSL/gsl-
>>>> 1.9/cdf -I/fuelberg/r0/lpeffers/MET_9/GSL/gsl-1.9/gsl
>>>> In file included from ../vx_met_util/vx_met_util.h:21,
>>>>                  from read_grib.cc:20:
>>>> ../vx_met_util/read_pcp_combine_netcdf.h:16:21: error: netcdf.hh: No
>>> such
>>>> file or directory
>>>> ../vx_data_grids/grid_base.h:194: warning: āclass Integrandā has
>>> virtual
>>>> functions but non-virtual destructor
>>>> ../vx_data_grids/grid_base.h:206: warning: āclass GridInterfaceā has
>>> virtual
>>>> functions but non-virtual destructor
>>>> ../vx_wrfdata/shape.h:34: warning: āclass Shapeā has virtual functions
>>> but
>>>> non-virtual destructor
>>>> ../vx_wrfdata/shape.h:50: warning: āclass FreelyMoveableShapeā has
>>> virtual
>>>> functions but non-virtual destructor
>>>> ../vx_met_util/read_pcp_combine_netcdf.h:25: warning:
>>>> āread_pcp_combine_netcdfā initialized and declared āexternā
>>>> ../vx_met_util/read_pcp_combine_netcdf.h:25: error: variable or field
>>>> āread_pcp_combine_netcdfā declared void
>>>> ../vx_met_util/read_pcp_combine_netcdf.h:25: error: āNcFileā was not
>>>> declared in this scope
>>>> ../vx_met_util/read_pcp_combine_netcdf.h:25: error: expected
>>>> primary-expression before ā,ā token
>>>> ../vx_met_util/read_pcp_combine_netcdf.h:25: error: expected
>>>> primary-expression before ā&ā token
>>>> ../vx_met_util/read_pcp_combine_netcdf.h:25: error: expected
>>>> primary-expression before ā,ā token
>>>> ../vx_met_util/read_pcp_combine_netcdf.h:25: error: expected
>>>> primary-expression before ā&ā token
>>>> ../vx_met_util/read_pcp_combine_netcdf.h:25: error: expected
>>>> primary-expression before ā,ā token
>>>> ../vx_met_util/read_pcp_combine_netcdf.h:25: error: expected
>>>> primary-expression before āintā
>>>> ../vx_met_util/read_pcp_combine_netcdf.h:26: error: expected
>>>> primary-expression before ā&ā token
>>>> ../vx_met_util/read_pcp_combine_netcdf.h:26: error: expected
>>>> primary-expression before ā,ā token
>>>> ../vx_met_util/read_pcp_combine_netcdf.h:26: error: expected
>>>> primary-expression before ā&ā token
>>>> ../vx_met_util/read_pcp_combine_netcdf.h:26: error: expected
>>>> primary-expression before ā,ā token
>>>> ../vx_met_util/read_pcp_combine_netcdf.h:27: error: expected
>>>> primary-expression before ā&ā token
>>>> ../vx_met_util/read_pcp_combine_netcdf.h:27: error: expected
>>>> primary-expression before ā)ā token
>>>> ../vx_met_util/read_pcp_combine_netcdf.h:27: error: initializer
>>> expression
>>>> list treated as compound expression
>>>> ../vx_wrfdata/vx_wrfdata.h:41: warning: āwrfdata_magicā defined but
>>> not used
>>>> ../vx_wrfdata/vx_wrfdata.h:64: warning: āthresh_type_strā defined but
>>> not
>>>> used
>>>> ../vx_wrfdata/vx_wrfdata.h:85: warning: āstep_direction_strā defined
>>> but not
>>>> used
>>>> ../vx_met_util/constants.h:23: warning: āna_strā defined but not used
>>>> ../vx_met_util/constants.h:26: warning: āall_msg_typ_strā defined but
>>> not
>>>> used
>>>> ../vx_met_util/constants.h:30: warning: āanyair_strā defined but not
>>> used
>>>> ../vx_met_util/constants.h:31: warning: āanyair_msg_typ_strā defined
>>> but not
>>>> used
>>>> ../vx_met_util/constants.h:32: warning: āanysfc_strā defined but not
>>> used
>>>> ../vx_met_util/constants.h:33: warning: āanysfc_msg_typ_strā defined
>>> but not
>>>> used
>>>> ../vx_met_util/constants.h:34: warning: āonlysf_strā defined but not
>>> used
>>>> ../vx_met_util/constants.h:35: warning: āonlysf_msg_typ_strā defined
>>> but not
>>>> used
>>>> ../vx_met_util/constants.h:38: warning: āall_interp_mthd_strā defined
>>> but
>>>> not used
>>>> ../vx_met_util/constants.h:49: warning: āmthd_strā defined but not
>>> used
>>>> ../vx_met_util/met_stats.h:20: warning: āhdr_fmt_strā defined but not
>>> used
>>>> ../vx_grib_classes/grib_strings.h:20: warning: āmissing_strā defined
>>> but not
>>>> used
>>>> ../vx_grib_classes/grib_strings.h:62: warning: āgrib_code_listā
>>> defined but
>>>> not used
>>>> ../vx_grib_classes/grib_strings.h:94: warning: āgrib_code_list_strā
>>> defined
>>>> but not used
>>>> ../vx_grib_classes/grib_strings.h:391: warning: āgrib_level_list_strā
>>>> defined but not used
>>>> make[3]: *** [read_grib.o] Error 1
>>>> make[2]: *** [vx_met_util_all] Error 2
>>>> make[1]: *** [libs] Error 2
>>>> make: *** [all] Error 2
>>>>
>>>>
>>>>
>>>>
>>> ------------------------------------------------------------------------
>>>> _______________________________________________
>>>> Met_help mailing list
>>>> Met_help at mailman.ucar.edu
>>>> http://mailman.ucar.edu/mailman/listinfo/met_help
>>> # *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
>>> # ** Copyright UCAR (c) 1992 - 2007
>>> # ** University Corporation for Atmospheric Research (UCAR)
>>> # ** National Center for Atmospheric Research (NCAR)
>>> # ** Research Applications Lab (RAL)
>>> # ** P.O.Box 3000, Boulder, Colorado, 80307-3000, USA
>>> # *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
>>>
>>>
>>> ###############################################################################
>>> #
>>> # Makefile for the vx_met_util library
>>> #
>>>
>>> ###############################################################################
>>>
>>> TARGETS  = libvx_met_util.a
>>>
>>> OBJECTS  = apply_mask.o \
>>>        compute_ci.o \
>>>        met_stats.o \
>>>        read_grib.o \
>>>        read_pcp_combine_netcdf.o \
>>>        rescale_lon.o \
>>>        two_to_one.o
>>>
>>> OPT_FLAGS=
>>>
>>> FAKES    = vx_met_util_all vx_met_util_lib clean
>>>
>>> LIB_DIR  = ..
>>>
>>>
>>> vx_met_util_all:
>>>        @ echo
>>>        @ echo "*** Making vx_met_util Library ***"
>>>        @ echo
>>>        @ make vx_met_util_lib  --no-print-directory
>>>        cp $(TARGETS) ../.
>>>
>>> vx_met_util_lib: libvx_met_util.a
>>>        @ echo
>>>
>>> libvx_met_util.a: $(OBJECTS)
>>>        ar -rs libvx_met_util.a $(OBJECTS)
>>>        ranlib libvx_met_util.a
>>>
>>> apply_mask.o: apply_mask.cc
>>>        $(COMPILER) apply_mask.cc $(FLAGS) $(OPT_FLAGS) -c
>>> -DMET_BASE=\"$(MET_BASE)\" -I$(LIB_DIR)
>>>
>>> compute_ci.o: compute_ci.cc
>>>        $(COMPILER) compute_ci.cc $(FLAGS) $(OPT_FLAGS) -c -I$(LIB_DIR)
>>> $(GSL_INCS)
>>>
>>> met_stats.o: met_stats.cc
>>>        $(COMPILER) met_stats.cc $(FLAGS) $(OPT_FLAGS) -c -I$(LIB_DIR)
>>> $(GSL_INCS)
>>>
>>> read_grib.o: read_grib.cc
>>>        $(COMPILER) read_grib.cc $(FLAGS) $(OPT_FLAGS) -c -I$(LIB_DIR)
>>> $(GSL_INCS) $(NETCDF_INCS)
>>>
>>> read_pcp_combine_netcdf.o: read_pcp_combine_netcdf.cc
>>>        $(COMPILER) read_pcp_combine_netcdf.cc $(FLAGS) $(OPT_FLAGS) -c
>>> -I$(LIB_DIR) $(NETCDF_INCS)
>>>
>>> rescale_lon.o: rescale_lon.cc
>>>        $(COMPILER) rescale_lon.cc $(FLAGS) $(OPT_FLAGS) -c -I$(LIB_DIR)
>>>
>>> two_to_one.o: two_to_one.cc
>>>        $(COMPILER) two_to_one.cc $(FLAGS) $(OPT_FLAGS) -c -I$(LIB_DIR)
>>>
>>> clean:
>>>        rm -f *.a *.o temp junk core a.out $(TARGETS) ../$(TARGETS)
>>>
>>> .PHONY: $(FAKES)
>>>
>>>
>>>
>>>
-------------- next part --------------
# *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
# ** Copyright UCAR (c) 1992 - 2005
# ** University Corporation for Atmospheric Research(UCAR)
# ** National Center for Atmospheric Research(NCAR)
# ** Research Applications Lab (RAL)
# ** P.O.Box 3000, Boulder, Colorado, 80307-3000, USA
# *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*

###############################################################################
#
# Makefile for the Model Evaluation Tools Project 
#
###############################################################################

###############################################################################
#
# Begin Variables to be modified before building
#
###############################################################################

# Path to the C++ Compiler
CPP_COMPILER = /tools/pgi-v6.1-6/bin/pgCC

# Path to the Fortran-77 Compiler
F77_COMPILER = /tools/pgi-v6.1-6/bin/pgf77

# Top level directory for the MET build
MET_BASE     = /pd6/score/MET/MET_releases/+++VERSION+++

# Top level directory for the NetCDF library
NETCDF_BASE  = /usr/local/netcdf-3.6.1-pgi6

# Directory within the NetCDF library containing the C/C++ header files:
#    netcdf.hh
# Specified as: -I/your/include/path
NETCDF_INCS  = -I$(NETCDF_BASE)/include

# Directories within the NetCDF library containing the C/C++ archive files:
#    libnetcdf.a and libnetcdf_c++.a
# Specified as: -L/your/library/path
NETCDF_LIBS  = -L$(NETCDF_BASE)/lib -L$(NETCDF_BASE)/include

# Top level directory for the BUFR library
BUFR_BASE    = /pd6/score/verif_se/lib/bufrlib_pgi

# Directory within the BUFR library containing header files
# Specified as: -I/your/include/path
BUFR_INCS    = -I$(BUFR_BASE)

# Directory within the BUFR library containing the libbufr.a archive file
# Specified as: -L/your/library/path
BUFR_LIBS    = -L$(BUFR_BASE)

# Directory containing the GNU Scientific Library header files 
# (if they're not in a standard location)
# Specified as: -I/your/include/path
GSL_INCS     =

# Directory containing the GNU Scientific Library archive file, libgsl.a
# (if it's not in a standard location)
# Specified as: -L/your/library/path
GSL_LIBS     =

# Directory containing the F2C or G2C Library header files 
# (if they're not in a standard location)
# Specified as: -I/your/include/path
F2C_INCS     =

# Directory containing the F2C or G2C Library archive file, 
# libf2c.a or libg2c.a (if it's not in a standard location)
# Specified as: -L/your/library/path
F2C_LIBS     =

# Name of the Fortan to C Library to be used
# Specified as: -lf2c or -lg2c
F2C_LIBNAME  = -lf2c

###############################################################################
#
# End Variables to be modified before building
#
###############################################################################

###############################################################################
#
# Export variables to be used by submakes
#
###############################################################################

export MET_BASE

export NETCDF_INCS

export NETCDF_LIBS

export BUFR_INCS

export BUFR_LIBS

export GSL_INCS

export GSL_LIBS

export F2C_INCS

export F2C_LIBS

export F2C_LIBNAME

###############################################################################
#
# End export variables to be used by submakes
#
###############################################################################

PGI_LIBS	= -lpgftnrtl

FLAGS		= -g -Bstatic

FAKES		= all clean libs targets

LIB_DIR		= lib

INC_DIR		= lib

SRC_DIR		= src

VX_AFM		= $(LIB_DIR)/vx_afm
VX_ANALYSIS_UTIL= $(LIB_DIR)/vx_analysis_util
VX_CAL		= $(LIB_DIR)/vx_cal
VX_COLOR	= $(LIB_DIR)/vx_color
VX_CONTABLE	= $(LIB_DIR)/vx_contable
VX_DATA_GRIDS	= $(LIB_DIR)/vx_data_grids
VX_ECONFIG	= $(LIB_DIR)/vx_econfig
VX_GNOMON	= $(LIB_DIR)/vx_gnomon
VX_GRIB_CLASSES	= $(LIB_DIR)/vx_grib_classes
VX_GSL_PROB	= $(LIB_DIR)/vx_gsl_prob
VX_MATH		= $(LIB_DIR)/vx_math
VX_MET_UTIL	= $(LIB_DIR)/vx_met_util
VX_NAV		= $(LIB_DIR)/vx_nav
VX_PLOT_UTIL	= $(LIB_DIR)/vx_plot_util
VX_PS		= $(LIB_DIR)/vx_ps
VX_PXM		= $(LIB_DIR)/vx_pxm
VX_RENDER	= $(LIB_DIR)/vx_render
VX_UTIL		= $(LIB_DIR)/vx_util
VX_WRFDATA	= $(LIB_DIR)/vx_wrfdata
VX_WRFMODE	= $(LIB_DIR)/vx_wrfmode
PCP_COMBINE	= $(SRC_DIR)/pcp_combine
MODE		= $(SRC_DIR)/mode
GRID_STAT	= $(SRC_DIR)/grid_stat
PB2NC		= $(SRC_DIR)/pb2nc
POINT_STAT	= $(SRC_DIR)/point_stat
VSDB_ANALYSIS	= $(SRC_DIR)/vsdb_analysis
MODE_ANALYSIS	= $(SRC_DIR)/mode_analysis

all:
	@ echo
	@ echo "*** Making the Model Evaluation Tools Project ***"
	@ echo
	@ make libs    --no-print-directory
	@ make targets --no-print-directory
	@ echo
	@ echo "*** Finished Making the Model Evaluation Tools Project ***"
	@ echo

libs:
	@ cd $(VX_AFM);		 make COMPILER=$(CPP_COMPILER) FLAGS="$(FLAGS)" --no-print-directory
	@ cd $(VX_ANALYSIS_UTIL);make COMPILER=$(CPP_COMPILER) FLAGS="$(FLAGS)" --no-print-directory
	@ cd $(VX_CAL);		 make COMPILER=$(CPP_COMPILER) FLAGS="$(FLAGS)" --no-print-directory
	@ cd $(VX_COLOR);	 make COMPILER=$(CPP_COMPILER) FLAGS="$(FLAGS)" --no-print-directory
	@ cd $(VX_CONTABLE);	 make COMPILER=$(CPP_COMPILER) FLAGS="$(FLAGS)" --no-print-directory
	@ cd $(VX_DATA_GRIDS);	 make COMPILER=$(CPP_COMPILER) FLAGS="$(FLAGS)" --no-print-directory
	@ cd $(VX_ECONFIG);	 make COMPILER=$(CPP_COMPILER) FLAGS="$(FLAGS)" --no-print-directory
	@ cd $(VX_GNOMON);	 make COMPILER=$(CPP_COMPILER) FLAGS="$(FLAGS)" --no-print-directory
	@ cd $(VX_GRIB_CLASSES); make COMPILER=$(CPP_COMPILER) FLAGS="$(FLAGS)" --no-print-directory
	@ cd $(VX_GSL_PROB);	 make COMPILER=$(CPP_COMPILER) FLAGS="$(FLAGS)" --no-print-directory
	@ cd $(VX_MATH);	 make COMPILER=$(CPP_COMPILER) FLAGS="$(FLAGS)" --no-print-directory
	@ cd $(VX_MET_UTIL);	 make COMPILER=$(CPP_COMPILER) FLAGS="$(FLAGS)" --no-print-directory
	@ cd $(VX_NAV);		 make COMPILER=$(CPP_COMPILER) FLAGS="$(FLAGS)" --no-print-directory
	@ cd $(VX_PLOT_UTIL);	 make COMPILER=$(CPP_COMPILER) FLAGS="$(FLAGS)" --no-print-directory
	@ cd $(VX_PS);		 make COMPILER=$(CPP_COMPILER) FLAGS="$(FLAGS)" --no-print-directory
	@ cd $(VX_PXM);		 make COMPILER=$(CPP_COMPILER) FLAGS="$(FLAGS)" --no-print-directory
	@ cd $(VX_RENDER);	 make COMPILER=$(CPP_COMPILER) FLAGS="$(FLAGS)" --no-print-directory
	@ cd $(VX_UTIL);	 make COMPILER=$(CPP_COMPILER) FLAGS="$(FLAGS)" --no-print-directory
	@ cd $(VX_WRFDATA);	 make COMPILER=$(CPP_COMPILER) FLAGS="$(FLAGS)" --no-print-directory
	@ cd $(VX_WRFMODE);	 make COMPILER=$(CPP_COMPILER) FLAGS="$(FLAGS)" --no-print-directory

targets: 
	@ cd $(PCP_COMBINE);	 make COMPILER=$(CPP_COMPILER) FLAGS="$(FLAGS)" --no-print-directory
	@ cd $(MODE);		 make COMPILER=$(CPP_COMPILER) FLAGS="$(FLAGS)" --no-print-directory
	@ cd $(GRID_STAT);	 make COMPILER=$(CPP_COMPILER) FLAGS="$(FLAGS)" --no-print-directory
	@ cd $(PB2NC);		 make CPP_COMPILER=$(CPP_COMPILER) F77_COMPILER=$(F77_COMPILER) FLAGS="$(FLAGS)" PGI_LIBS="$(PGI_LIBS)" --no-print-directory
	@ cd $(POINT_STAT);	 make COMPILER=$(CPP_COMPILER) FLAGS="$(FLAGS)" --no-print-directory
	@ cd $(VSDB_ANALYSIS);	 make COMPILER=$(CPP_COMPILER) FLAGS="$(FLAGS)" --no-print-directory
	@ cd $(MODE_ANALYSIS);	 make COMPILER=$(CPP_COMPILER) FLAGS="$(FLAGS)" --no-print-directory

clean:
	@ cd $(VX_AFM);		 make clean --no-print-directory
	@ cd $(VX_ANALYSIS_UTIL);make clean --no-print-directory
	@ cd $(VX_CAL);		 make clean --no-print-directory
	@ cd $(VX_COLOR);	 make clean --no-print-directory
	@ cd $(VX_CONTABLE);	 make clean --no-print-directory
	@ cd $(VX_DATA_GRIDS);	 make clean --no-print-directory
	@ cd $(VX_ECONFIG);	 make clean --no-print-directory
	@ cd $(VX_GNOMON);	 make clean --no-print-directory
	@ cd $(VX_GRIB_CLASSES); make clean --no-print-directory
	@ cd $(VX_GSL_PROB);	 make clean --no-print-directory
	@ cd $(VX_MATH);	 make clean --no-print-directory
	@ cd $(VX_MET_UTIL);	 make clean --no-print-directory
	@ cd $(VX_NAV);		 make clean --no-print-directory
	@ cd $(VX_PLOT_UTIL);	 make clean --no-print-directory
	@ cd $(VX_PS);		 make clean --no-print-directory
	@ cd $(VX_PXM);		 make clean --no-print-directory
	@ cd $(VX_RENDER);	 make clean --no-print-directory
	@ cd $(VX_UTIL);	 make clean --no-print-directory
	@ cd $(VX_WRFDATA);	 make clean --no-print-directory
	@ cd $(VX_WRFMODE);	 make clean --no-print-directory
	@ cd $(PCP_COMBINE);	 make clean --no-print-directory
	@ cd $(MODE);		 make clean --no-print-directory
	@ cd $(GRID_STAT);	 make clean --no-print-directory
	@ cd $(PB2NC);		 make clean --no-print-directory
	@ cd $(POINT_STAT);	 make clean --no-print-directory
	@ cd $(VSDB_ANALYSIS);	 make clean --no-print-directory
	@ cd $(MODE_ANALYSIS);	 make clean --no-print-directory
	rm -r -f *.a *.o junk temp core log c.ps a.out

.PHONY: $(FAKES)


More information about the Met_help mailing list