Crash if trying to write a parameter or a constant in a Fortran application

Wei-keng Liao wkliao at ece.northwestern.edu
Tue Jul 9 11:17:15 CDT 2013


Rob,

When defining a 0-length dimension variable in F90, skip the argument dimids.
i.e.
      status = nf90_def_var(f_id,'var', NF90_INT,var_id)


NetCDF 3 and 4 pass the test, because they do internal caching. So
byte-swap is done on the cache buffer and the memory contents of
Fortran parameters are not touched.


Wei-keng

On Jul 9, 2013, at 10:14 AM, Rob Latham wrote:

> On Tue, Jul 09, 2013 at 08:53:24AM -0500, Rob Latham wrote:
>> Does serial netcdf exhibit this behavior?  
> 
> Here's my serial netcdf-f90 version of your test case, but it's buggy:
> I am apparently trying to write to a variable that does not exist?
> Our policy is to be as netcdf-like as possible, or have a good reason
> not to be, and I'd like to know how serial netcdf handles the case of
> byte swapping data passed to it in this un-modifiable parameter form.
> 
> ==rob
> 
> -- 
> Rob Latham
> Mathematics and Computer Science Division
> Argonne National Lab, IL USA
> <netcdf_parameter.f90>



More information about the parallel-netcdf mailing list