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

20040723: netCDF Fortran (77 + 90) - Mac OSX 10.3 and Linux redhat - Strang 2d array error



Chris,

> To: address@hidden
> From: "Chris Dallimore" <address@hidden>
> Subject: netCDF Fortran (77 + 90) - Mac OSX 10.3 and Linux redhat - Strang 2d 
> array error
> Organization: UWA
> Keywords: 200407230232.i6N2WMv1022403 netCDF F90 MacOS-X

The above message contained the following:

> Institution: Centre for Water Research
> Package Version: 3.5.1
> Operating System: Mac OSX 10.3 and Linux redhat
> Hardware Information: g5 dual 2ghz; pentium 4 2.8ghz
> Inquiry: I'm getting a strange error using the f90 Netcdf library on
>     two different OS using two different compilers.
> 
> I am ouputting a two-dimensional real array to a netcdf file using
> NF90_PUT_VAR.  The array looks like
> 
>  1        3         NAN
>  2        4         5
> NAN  NAN  6
> 
> Firstly on OSX,  I have managed to configure make and test the library
> using both the beta version of IBM's xlf and the release version of xlf
> (8.1).
> 
> Now comes the strang bit.  When our program is linked to the beta
> compiled library the array is output fine but when I link it to th
> elibrary compiled with release version of the compiler the output is
> 
>  1        NAN  4 
>  2        NAN  NAN
> NAN  3         NAN
> 
> And to complicate things further on Linux everything is OK if I use the
> Intel compiler version 8 of lahey version 6.1  but I get the same
> skewed result if I use Intel version 7.

Very strange, indeed.  Did all versions of the netCDF package pass the
package's "make test" test?  Is this a simple program that you could
send us?

> I am assuming this is probabley a compiler problem but wanted to let
> you know and check to see if this sort of problem had been observed
> before.

We've seen array indexing problems with certain versions of the Portland
Group Fortran-90 compiler (pgf90) but not (yet) with the xlf compiler.

> thanks for your time.
> 
> Chris Dallimore
> 
> From: "Chris Dallimore" <address@hidden>
> 
> Institution: CWR
> Package Version: 3.5.1
> Operating System: OSX
> Hardware Information: G5
> Inquiry: Hi, I sent an email earlier today about a problem on OSX.
> 
> I made a mistake in my diagnosis.  The problem with the xlf compiler
> was not introduced between beta and release but between release and the
> March 2004 update.  The recent July 2004 update does not fix the
> problem.
> 
> Thanks
> 
> Chris Dallimore

Regards,
Steve Emmerson

> NOTE: All email exchanges with Unidata User Support are recorded in the
> Unidata inquiry tracking system and then made publically available
> through the web.  If you do not want to have your interactions made
> available in this way, you must let us know in each email you send to us.