Project

General

Profile

Error compiling cosmo_131108_5.00_clm6

Added by Johann Züger over 4 years ago

An error occurs when I try to compile cosmo_131108_5.00_clm6. Although there are no errors indicated for routine netcdf_io.f90, the size of the object file is only 250 Byte and the netcdf_io.mod is empty, which subsequently leads to errors within the module src_output.f90. I have tried nearly all netCDF Versions available but with no success. Did anyone face similar problems with this version?

Best, Johann


Replies (6)

RE: Error compiling cosmo_131108_5.00_clm6 - Added by Hans-Juergen Panitz over 4 years ago

Hi Johann,

which machine are you using?
Could you provide your compile-script?

Best

Hans-Juergen

RE: Error compiling cosmo_131108_5.00_clm6 - Added by Johann Züger over 4 years ago

I use a Tyan machine with Debian 7 (Wheezy), mpich2, gfortran-4.7 and various netCDF-4 versions.

Fopts looks like:

PROGRAM = CLM_URB5

STDROOT = ${PWD}
SRCDIR = $(STDROOT)/src
OBJDIR = $(STDROOT)/obj
WORKDIR = $(STDROOT)/work

MPI_INC = /usr/include/mpich2
GRIB_INC = /home/zueger/CLM/dwd_grib_gf_par
NC_INC = /usr/include

LPATH = -L/usr/lib
LIBS = -lnetcdff

GRIB_LIB1 = /home/zueger/CLM/dwd_grib_gf_par/libgrib1.a
GRIB_LIB = -L/usr/lib -lgrib_api_f90 -lgrib_api
NETCDF = /usr/lib
NC_LIB = /usr/lib/libnetcdff.a
NC_MOD = -I/usr/include

#
  1. compiler
    F90 = /usr/bin/mpif90.mpich2_g -cpp -c
    F902 =${F90}
  2. linker
    LDPAR = /usr/bin/mpif90.mpich2_g -static
    LDSEQ = gfortran #
  3. compile-flags #
    COMFLG = -O3 -I$(SRCDIR) -I$(MPI_INC) -I$(NC_INC) -I$(GRIB_INC) \
    -DNETCDF -DCLM -DGRIBDWD #
    COMFLG2=$(COMFLG)
    COMFLG3=$(COMFLG)
    COMFLG4=$(COMFLG) #
  4. link-flags #
    LDFLG = -O3 -DSGI -I$(SRCDIR) -I$(NC_INC) \
    -I${MPI_INC} #
    LIB = ${LPATH} ${LIBS} ${GRIB_LIB} ${NC_LIB}

This is the version with standard netCDF package, but the problem is the same with every package I used.

Best, Johann

RE: Error compiling cosmo_131108_5.00_clm6 - Added by Burkhardt Rockel over 4 years ago

Are you sure that libnetcdff.a contains also the C-Part of netCDF?
Have you tried:

NC_LIB = /usr/lib/libnetcdf.a /usr/lib/libnetcdff.a

RE: Error compiling cosmo_131108_5.00_clm6 - Added by Hans-Juergen Panitz over 4 years ago

Exactly, this was also my suggestion.

Hans-Juergen

RE: Error compiling cosmo_131108_5.00_clm6 - Added by Johann Züger over 4 years ago

Yes, I have tried both, but the problem is, that I never get to the link part. Compiling stops because the object file netcdf_io.o is obviously corrupt and netcdf_io.mod is empty. When starting compilation of src_output.f90 an error occurs at the statement “USE netcdf_io”: “Symbol send_asyn_io referenced not found in module netcdf_io.”

Johann

RE: Error compiling cosmo_131108_5.00_clm6 - Added by Johann Züger over 4 years ago

At last I found the mistake. For some reason the parameter COMFLG1 was missing in Fopts - at least compilation seems to work fine now.
Thanks for support,
Johann

    (1-6/6)