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

Re: 20040420:NetCDF 3.5.1 fails to compile with pgf90 3.3 on RH Enterprise



>To: address@hidden
>From: "Game-Master" <address@hidden>
>Subject: NetCDF 3.5.1 fails to compile with pgf90 3.3 on RH Enterprise
>Organization: UCAR/Unidata
>Keywords: 200404191951.i3JJpbCT023836

Hi Jeremy,

Sorry it's taken so long to reply.  Your original email sort of "fell
through the cracks".

> NetCDF 3.5.1 fails to compile with pgf90 3.3 on RH Enterprise.  We are
> using it for atmospheric research on a beowulf cluster at the
> university.  It worked fine before upgrading to RH Enterprise.
> 
> We started compiling with the later version of pgf90 (5.1), but ran into
> problems, your support site mentioned downgrading, but even with an
> eariler verision (3.3) we are still running into errors.
> 
> Any help you can give would be much appreciated.
> 
> Attached are the log files and out put from:
> make distclean
> export CC=gcc
> export CPPFLAGS=-Df2cFortran
> export FC=pgf90
> export F90=
> export FFLAGS=-O
> export CXX=g++
> ./configure --prefix=../.. > configure.log 2> configurelog
> make > make.log 2> make.log
> make install > install.log 2> install.log
> 
> typescript
> make test
> exit
> 
> compiler:
> pgf90 3.3-2
> Copyright 1989-2000, The Portland Group, Inc.  All Rights Reserved.
> Copyright 2000-2001, STMicroelectronics, Inc.  All Rights Reserved.
> 
> uname:
> Linux messner.math.uwm.edu 2.4.21-9.0.1.ELsmp #1 SMP Mon Feb 9 22:26:51
> EST 2004 i686 i686 i386 GNU/Linux

 ...

> gcc -c -O   -Df2cFortran fortlib.c
> pgf90 -o nf_test -O  test_get.o test_put.o nf_error.o nf_test.o test_read.o 
> test_write.o util.o fortlib.o ../libsrc/libnetcdf.a  -lm 
> test_get.o(.text+0x4d): In function `test_nf_get_var1_text_':
> : undefined reference to `nf_open_'

I don't think "CPPFLAGS=-Df2cFortran" is the right setting to use on
Linux with the Portland Group compilers.  Try

    CPPFLAGS=-DpgiFortran

instead.  We have at least one report of that working with gcc, and it
looks like the error messages you're getting are consistent with
having the wrong CPPFLAGS setting, which controls how C functions are
called from Fortran in the cfortran.h include.

--Russ