proplem compiling netcdf 3.5.1 on RHEL 3 with PGI 5.1.2

I have followed the instructions on http://www.pgroup.com/resources/netcdf/netcdf351_pgi5x_32.htm
I get an error when running “make test” as follows: (first tests are ok, the error is at the end)
Any suggestions are welcome
Platform: PC, 2cpu Xeon
Linux master 2.4.21-15.ELsmp #1 SMP Thu Apr 22 00:18:24 EDT 2004 i686 i686 i386 GNU/Linux
Maurice Politis

make[1]: Entering directory `/home/mm5user/spain/netcdf-3.5.1/src’

Making `all’ in directory /home/mm5user/spain/netcdf-3.5.1/src/fortran

make[2]: Entering directory /home/mm5user/spain/netcdf-3.5.1/src/fortran' ar cru ../libsrc/libnetcdf.a fort-attio.o fort-control.o fort-dim.o fort-genatt.o fort-geninq.o fort-genvar.o fort-lib.o fort-misc.o fort-v2compat.o fort-vario.o fort-var1io.o fort-varaio.o fort-varmio.o fort-varsio.o ranlib ../libsrc/libnetcdf.a make[2]: Leaving directory /home/mm5user/spain/netcdf-3.5.1/src/fortran’

Returning to directory /home/mm5user/spain/netcdf-3.5.1/src

make[1]: Leaving directory /home/mm5user/spain/netcdf-3.5.1/src' make[1]: Entering directory /home/mm5user/spain/netcdf-3.5.1/src’

Making `test’ in directory /home/mm5user/spain/netcdf-3.5.1/src/libsrc

make[2]: Entering directory `/home/mm5user/spain/netcdf-3.5.1/src/libsrc’
/opt/pgi/linux86/5.1/bin/pgcc -c -O -Msignextend -V -I. -DNDEBUG -DpgiFortran t_nc.c
PGC/x86 Linux/x86 5.1-3
Copyright 1989-2000, The Portland Group, Inc. All Rights Reserved.
Copyright 2000-2003, STMicroelectronics, Inc. All Rights Reserved.

pgcc 5.1-3
Copyright 1989-2000, The Portland Group, Inc. All Rights Reserved.
Copyright 2000-2003, STMicroelectronics, Inc. All Rights Reserved.
ar cru libnetcdf.a attr.o dim.o error.o libvers.o nc.o ncio.o ncx.o putget.o string.o v1hpg.o v2i.o var.o
ranlib libnetcdf.a
/opt/pgi/linux86/5.1/bin/pgcc -o t_nc -O -Msignextend -V t_nc.o -L. -lnetcdf

pgcc 5.1-3
Copyright 1989-2000, The Portland Group, Inc. All Rights Reserved.
Copyright 2000-2003, STMicroelectronics, Inc. All Rights Reserved.
./t_nc
dimrename: IXX
nc_close ret = 0

reopen id = 3 for filename test.nc
NC done
GATTR VAR VATTR
VATTR
VATTR
VATTR
VATTR
VATTR
fill_seq indices 1 2 3 75.000000 != 2.718282
Done
got val = 3.250000
got val = 0.000000
got val = 2.718282
got val = 82555
got val = 97
got NC_CHAR val = A (0x41)
got NC_CHAR val = B (0x42)
got NC_CHAR val = “The red death had long devastated the country.”
got val = A (0x41)
got val = B (0x42)
got val = “The red death had long devastated the country.”
got vals = 0.000000 … 447.000000
re nc_close ret = 0
cmp test.nc test_nc.sav
*** Success ***
make[2]: Leaving directory `/home/mm5user/spain/netcdf-3.5.1/src/libsrc’

Returning to directory /home/mm5user/spain/netcdf-3.5.1/src

make[1]: Leaving directory /home/mm5user/spain/netcdf-3.5.1/src' make[1]: Entering directory /home/mm5user/spain/netcdf-3.5.1/src’

Making test' in directory /home/mm5user/spain/netcdf-3.5.1/src/nc_test \ \ ------- clipped ---------------- *** Testing nccre ... *** Testing ncddef ... *** Testing ncvdef ... *** Testing ncapt, ncaptc ... *** Testing ncclos ... *** Testing ncvpt1 ... *** Testing ncvgt1 ... *** Testing ncvpt ... *** Testing ncopn, ncinq, ncdinq, ncvinq, ncanam, ncainq ... *** Testing ncvgt, ncvgtc ... *** Testing ncagt, ncagtc ... *** Testing ncredf, ncdren, ncvren, ncaren, ncendf ... *** Testing ncacpy ... *** Testing ncadel ... *** Testing fill values ... make[2]: Leaving directory /home/mm5user/spain/netcdf-3.5.1/src/fortran’

Returning to directory /home/mm5user/spain/netcdf-3.5.1/src

make[1]: Leaving directory /home/mm5user/spain/netcdf-3.5.1/src' make[1]: Entering directory /home/mm5user/spain/netcdf-3.5.1/src’

Making `test’ in directory /home/mm5user/spain/netcdf-3.5.1/src/f90

make[2]: Entering directory `/home/mm5user/spain/netcdf-3.5.1/src/f90’
/opt/pgi/linux86/5.1/bin/pgf90 -o netcdf_test netcdf_test.f90 netcdf.o typeSizes.o …/libsrc/libnetcdf.a
netcdf_test.f90:
./netcdf_test
example_good.cdl example.cdl differ: byte 881, line 37
*** Failure ***
*** example_good.cdl 2000-04-05 22:33:14.000000000 +0300
— example.cdl 2005-04-11 15:15:32.000000000 +0300


*** 34,43 ****
953, 954, 955,
956, 957, 958,
959, 960, 961,
! 962, 963, 964,
! 965, 966, 967,
! 968, 969, 970,
! 971, 972, 973 ;

lat = -90, -87.5, -85, -82.5 ;

— 34,43 ----
953, 954, 955,
956, 957, 958,
959, 960, 961,
! 950, 951, 952,
! 953, 954, 955,
! 956, 957, 958,
! 959, 960, 961 ;

lat = -90, -87.5, -85, -82.5 ;

make[2]: *** [test] Error 1
make[2]: Leaving directory /home/mm5user/spain/netcdf-3.5.1/src/f90' make[1]: *** [subdir_target] Error 1 make[1]: Leaving directory /home/mm5user/spain/netcdf-3.5.1/src’
make: *** [f90/test] Error 2

Hi Maurice,


You’ll need to update your compiler to at least release 5.1-6. (See http://www.pgroup.com/support/download_archive.php) in order to run NetCDF 3.5.1 without problems. Note the prerequisite section of the NetCDF guide.

Thanks,
Mat