[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

20030910: netCDF linking problem using pgf90



Roger,

>Date: Fri, 5 Sep 2003 11:21:25 +0800 (HKT)
>From: "HIU FUNG ROGER Kwok" <address@hidden>
>Organization: ?
>To: <address@hidden>
>Subject: pgf90 interface of netcdf

The above message contained the following:

    Sorry for the long output attached (>1400 lines). Very grateful indeed.
    ...

    fort-misc.o:
             U memcpy
             U memset
             U nc_inq_libvers
             U nc_strerror
    0000020c T nf_inq_libvers_


The symbol "nf_inq_libvers_" is defined in your installed, netCDF
library.  The symbol that your program is trying to find, however, is
"nf_inq_libvers__":

    /math/import/application/pgi/4.0/linux86/bin/pgf90 -o mcip.exe \
    -O2 -tp p7 -pc 32 -Mvect=prefetch -Mnoframe -Mfree -byteswapio \
    mcip.o alloc_met.o alloc_ctm.o alloc_x.o bcldprc_ak.o bilin2d.o \
    bilin3d.o close_files.o comheader.o collapx.o crs2dot.o cvmgp.o \
    cvmgz.o dealloc_met.o dealloc_x.o dealloc_ctm.o dynflds.o \
    getgist.o getluse.o getmet.o getpblht.o getsdt.o getversion.o \
    graceful_stop.o gridout.o init_met.o init_x.o julian.o layht.o \
    locate.o lutrans1.o lutrans2.o lutrans3.o lutrans4.o lutrans5.o \
    lutrans6.o m3dry.o mdate2hdate.o met3dsup.o metcro.o metdot.o \
    metgrid2ctm.o metvars2ctm.o null_x.o pblpkg.o pblpwr.o pblsup.o \
    radmdry.o ratint.o rdmm5.o rdmm5v2.o rdmm5v3.o readnml.o refstate.o \
    resistcalc.o setgriddefs.o setupmm5.o setupv2.o setupv3.o \
    sfcflux.o sfclayer.o slflux.o solar.o statflds.o transm.o \
    vertarys.o verthyd.o vertnhy.o vstamp.o wrgdesc.o const_mod.o \
    const_mete_mod.o const_pbl_mod.o coord_mod.o date_pack_mod.o \
    date_time_mod.o parms3_mod.o fdesc3_mod.o file_mod.o iodecl3_mod.o \
    lradmdat_mod.o groutcom_mod.o mcipparm_mod.o mcoutcom_mod.o \
    mdoutcom_mod.o metinfo_mod.o metvars_mod.o vgrd_mod.o xvars_mod.o \
    -L/math/staff/ma/maroger/cmaq/lib/ioapi_22/Linux2_x86pg -lioapi \
    -L/math/staff/ma/maroger/cmaq/lib/netCDF/Linux -lnetcdf
    /math/staff/ma/maroger/cmaq/lib/ioapi_22/Linux2_x86pg/libioapi.a(init3.o): 
In function `init3_':
    init3.o(.text+0x538): undefined reference to `nf_inq_libvers__'
    ...

Because the symbols are different, it appears that you are compiling
your program in a different way than the netCDF, Fortran-90 test-program
was compiled.

The netCDF, Fortran-90 test-program was compiled this way:

    /math/import/application/pgi/4.0/linux86/bin/pgf90 -c -O -w nf_test.F

How was your program compiled?  Please send me the command that created
the module "mcip.o" and any messages that it produced.

Regards,
Steve Emmerson