This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
Chen, >Date: Tue, 27 May 2003 02:12:20 +0800 >From: <address@hidden> >To: address@hidden >Subject: Netcdf install RedHat 9.0,help:) The above message contained the following: > Thank you for your kindly help. I followed the instructions you gave >me last time to compile the NetCDF-3.5.0, it did work. I tried make, >no problem; but when I tried make test, question arose. > > <my OS: RedHat 9.0> > <F90 compiler: Porland Group Fortran 4.0(evaluation)> > > The steps I did as follows: <Redirect output files > (configurator.log/make.log/test.log) are sent as accessories.> > ----------------------------------------------------------------- > > [root@localhost home]# tar -xpf netcdf.tar > [root@localhost home]# cd netcdf-3.5.0/src/ > [root@localhost src]# export CC=/usr/bin/gcc > [root@localhost src]# export CFLAGS="-O" > [root@localhost src]# export FC=/usr/bin/g77 > [root@localhost src]# export FFLAGS="-O -Wno-globals" > [root@localhost src]# export CXX=/usr/bin/g++ > [root@localhost src]# export CPPFLAGS="-Df2cFortran" > [root@localhost src]# export F90=/usr/pgi/linux86/bin/pgf90 > [root@localhost src]# export F90FLAGS="-O" > [root@localhost src]# ./configure >configure.log I see from the above that you're using both g77(1) and pgf90(1). This will cause problems because the two compilers have different argument-passing conventions. I suggest that you either don't build the Fortran-90 interface or use pgf90 to build both the Fortran-77 and Fortran-90 interfaces. To NOT build the Fortran-90 interface, perform steps 3 through 5 described near the end of the file INSTALL.html and use the following environment variable settings: export FC=/usr/bin/g77 export FFLAGS="-O -Wno-globals" export F90="" # causes Fortran-90 interface to be ignored export CPPFLAGS="-DNDEBUG -Df2cFortran" export CC=/usr/bin/gcc export CFLAGS="-O" export CXX=/usr/bin/g++ Then Perform steps 6 through 9. To use only the pgf90 Fortran compiler, perform steps 3 through 5 described near the end of the file INSTALL.html and use the following environment variable settings: export FC=/usr/pgi/linux86/bin/pgf90 # for both 77 & 90 interfaces export FFLAGS="-O -w" # different from above! export CPPFLAGS="-DNDEBUG -DpgiFortran" # different from above! export CC=/usr/bin/gcc export CFLAGS="-O" export CXX=/usr/bin/g++ Then Perform steps 6 through 9. Please let me know if this helps. Regards, Steve Emmerson