I am trying to compile netCDF with large array support and the fortran 90 interface. However I am miserably failing. My strong suspicion is that the size intrinsic and friends does not return default kind integers when code compiled with -Mlarge_arrays. The f90 interface therefore fails to build. Has anyone managed to get around this problem or any suggestions are welcome.
Are you getting something like this?
pgf90 -c -Msignextend -fastsse -Mlarge_arrays -Vdev netcdf.f90 PGF90-S-0095-Expression has wrong data type (./netcdf_text_variables.f90: 57) 0 inform, 0 warnings, 1 severes, 0 fatal for nf90_put_var_1d_text
Excert from “netcdf_text_variables.f90”:
integer, dimension(nf90_max_var_dims) :: localStart, localCount, localStride, localMap integer :: counter ... localStart (: ) = 1 localCount ( :numDims+1) = (/ len(values(1)), shape(values) /) localCount (numDims+2:) = 0
The problem here that localCount is an integer, however when you use “-Mlarge_arrays”, the data type of array intrinsics, i.e. SHAPE, LBOUND, UBOUND, etc, becomes INTEGER*8. When I change all the SHAPE calls to “int(shape(values))”, NetCDF compiles and the fortran tests run correctly.
Hope this helps,