I suspect it's the older version of gfortran. I have some code I
can compile and run at home under Fedora 13 that won't run here at
work under SL5.1 (RHEL 5.1).
--
Clint Bowman INTERNET: clint@xxxxxxxxxx
Air Quality Modeler INTERNET: clint@xxxxxxxxxxxxx
Department of Ecology VOICE: (360) 407-6815
PO Box 47600 FAX: (360) 407-7534
Olympia, WA 98504-7600
USPS: PO Box 47600, Olympia, WA 98504-7600
Parcels: 300 Desmond Drive, Lacey, WA 98503-1274
On Wed, 30 Mar 2011, Aaron Knister wrote:
First off-- please excuse my rusty fortran and netcdf terminology. I'm a
sysadmin not a scientific programmer :)
I'm having an issue where gfortran 4.1.2 isn't properly populating an array
of derived types. When I take the derived type out of the equation and use a
multi-dimensional array of the same dimensions the issue goes away. gfortran
4.4 doesn't have this issue but I'm stuck with 4.1.2 on RHEL5 since I'm
using netcdf from EPEL.
Here's a link to a directory containing the source for a sample application
that reproduces the issue, and the associated netcdf data file that I
massaged to remove everything I thought was irrelevant to the test case:
http://userpages.umbc.edu/~aaronk/66190/. The sample application populates
the array of derived data types as well as a separate multi-dimensional
array and prints the data points for one time step for both.
The output from the application compiled with gfortran 4.1.2 is below. The
output from any other fortran compiler I've found (including gfortran 4.4)
shows the values in the two columns matching:
imeas_ind: 20 time_len: 10
Reading input file foo.cdf
342875337.820070 , 342875336.850924
342875338.840225 , 342875336.901932
342875339.860377 , 342875336.952940
342875340.880531 , 342875337.003948
342875341.900685 , 342875337.054956
342875342.920840 , 342875337.105964
342875343.940992 , 342875337.156971
342875344.961145 , 342875337.207979
342875345.981300 , 342875337.258987
342875347.001455 , 342875337.309994
0.00000000000000 , 342875337.361002
0.00000000000000 , 342875337.412010
0.00000000000000 , 342875337.463018
0.00000000000000 , 342875337.514025
0.00000000000000 , 342875337.565033
0.00000000000000 , 342875337.616041
0.00000000000000 , 342875337.667048
0.00000000000000 , 342875337.718056
0.00000000000000 , 342875337.769064
0.00000000000000 , 342875337.820070
Is this an issue with netcdf, gfortran or the code?
Many thanks in advance!
-Aaron