I need to use the mcmodel=medium flag in my main program.
With this flag, my calls to the NetCDF routine nf90_get_var returns only 0s
Without the flag, it returns the correct values.
Unfortunately NetCDF itself hasn’t been ported to use the medium memory model or large arrays. However, your application should run correctly so long as you’re not trying to pass large arrays to NetCDF. What values are you passing to ‘nf90_get_var’?
Hi Mat,
I do not pass large arrays from NetCDF to Fortran.
The typical array is a float array of dim(100,100)
And I still have only 0s…
Thanks,
Vincent.
I was able to reproduce the issue with “-Mlarge_arrays” and will investigate the cause. Since it’s not needed, I think the best thing to do is to simply remove “-Mlarge_arrays” and just compile NetCDF with “-fastsse -fpic”.
I have recently encountered the same problem and I was wondering if you had resolved this?
We have the same situation in PGI 6.1, when we compile with -mcmodel=medium, the results of reading a netcdf file using ncdf_get_var() are 0’s. We don’t seem to have any problems with reading other details from the netcdf file, its just when we dynamically allocate memory.