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

20040302: building netCDF using pgf90



Igor,

> To: address@hidden
> From: Igor Pesenson <address@hidden>
> Subject: pgf90 and netcdf 
> Organization: Lawrence Berkeley National Laboratory
> Keywords: 200403012351.i21NplrV018794 netCDF PGF90

The above message contained the following:

>     I've been searching your mailing archives for a while now and 
> although I did find some related info I'm having problems putting it all 
> together. I'm also not sure where this just falls into the category of 
> bugs in the pgf90 compiler (how do I check which version I'm using?).
> 
> My system is
> Linux atmos.lbl.gov 2.4.20-6smp #1 SMP Thu Feb 27 09:36:38 EST 2003 i686 
> athlon i386 GNU/Linux
> 
> The problem arises when I try to compile some fortran code as follows:
> 
> [igorp@atmos proc_dir_diff]$ pgf90  -g -o proc_co2 proc_co2.o 
> output_netcdf_co2.o -L/usr/local/netcdf/lib   -lnetcdf
> output_netcdf_co2.o(.text+0x4d9): In function `output_netcdf_co2':
> output_netcdf_co2.F:49: undefined reference to `ncpopt_'
> output_netcdf_co2.o(.text+0x501):output_netcdf_co2.F:52: undefined 
> reference to `nccre_'
> output_netcdf_co2.o(.text+0x82e):output_netcdf_co2.F:71: undefined 
> reference to `ncddef_'
> ....
> 
> Guessing that I must have ignored some problems at installation, I went 
> back and tried re-installed the package with the following flags (after 
> executing 'make distclean'):
> 
> FC=pgf90
> CC=gcc
> CPPFLAGS='-DNDEBUG -DpgsFortran -Df2cFortran'
> CXX=g++

The above environment variable settings probably won't work.

Please try the following:

    1.  Go to the top-level source directory.

    2.  Perform steps 3 and 4 described at

            
http://my.unidata.ucar.edu/content/software/netcdf/INSTALL.html#ReportingProblems

    3.  Set the following environment variables to the indicated values:

            CC=gcc
            CPPFLAGS='-DNDEBUG -DpgiFortran'    # note spelling
            CFLAGS=-O
            FC=pgf90
            FFLAGS='-O -w'
            CXX=g++

    4.  Perform steps 6 through 9 described at

            
http://my.unidata.ucar.edu/content/software/netcdf/INSTALL.html#ReportingProblems

Please let me know if this helps.

Regards,
Steve Emmerson