PnetCDF Fortran Binding Issues
Jianwei Li
jianwei at cheetah.cpdc.ece.nwu.edu
Fri Aug 8 09:32:37 CDT 2003
I'm sorry, maybe I didn't make it clear enough.
but now things are a little bit messed up:)
There are 4 kinds of vectors involved:
1. *dimidp: that's the variable dimensionID list.
It just needs to reverse order, no +/- 1.
It's only involved in def_var, inq_var, inq_vardimid.
2. index[]/start[]: that's the coordinates of array element.
It needs +/- 1, as well as to reverse order.
It's involved in put/get_var1, put/get_vara, put/get_vars.
3. count[]: that's the edge lengths along each dimension.
It needs to reverse order, no +/- 1.
It's involved in put/get_vara, put/get_vars.
4. stride[]: that's the sampling interval along each dimension.
It also only needs to reverse order, no +/- 1
It's only involved in put/get_vars.
I think I made it distinct in the victim function list .txt file.
So they are a little bit different:)
Is it a problem to do it automatically?
Jianwei
> >It's great that the conversion was applied automatically!
> >The Fortran binding updates look perfect except that the
> >indices/coordinates need to substract 1 from the Fortran
> >indices/coordinates to get the C ones, while counts and
> >strides don't. So in the put/get_var1, put/get_vara, and
> >put/get_vars binding, I think the code segment
> >
> > if (ln > 0) {
> > int li;
> > l3 = (size_t *)malloc( ln * sizeof(size_t) );
> > for (li=0; li<ln; li++)
> > l3[li] = v3[ln-1-li];
> > }
> >
> >need to be changed to:
> >
> > if (ln > 0) {
> > int li;
> > l3 = (size_t *)malloc( ln * sizeof(size_t) );
> > for (li=0; li<ln; li++)
> > l3[li] = v3[ln-1-li]-1;
> > }
> >
> >as I indicated in my previous emails.
>
> Done. I also added one to the index where the value is an output value.
>
> Bill
>
More information about the parallel-netcdf
mailing list