Houston, we have a problem
Robert Latham
robl at mcs.anl.gov
Fri Aug 1 11:37:34 CDT 2003
On Fri, Aug 01, 2003 at 11:28:41AM -0500, Jianwei Li wrote:
>
> I think I know where the problem is now, after looking into the
> fortran binding code as a "human":)
>
> The automatic fortran binding is mistaking (*start)[], (*count)[],
> and (*stride)[] as *start[], *count[], *stride[].
> After changing the fortran binding interface code from
>
> FORTRAN_API void FORT_CALL nfmpi_put_vara_float_all_ ( int *v1, int *v2,
> int * v3[], int * v4[], float*v5, MPI_Fint *ierr ){
> *ierr = ncmpi_put_vara_float_all( *v1, *v2, (const size_t *)(*v3),
> (const size_t *)(*v4), v5 );
> }
>
> to
>
> FORTRAN_API void FORT_CALL nfmpi_put_vara_float_all_ ( int *v1, int *v2,
> int (* v3)[], int (* v4)[], float*v5, MPI_Fint *ierr ){
> *ierr = ncmpi_put_vara_float_all( *v1, *v2, (const size_t *)(*v3),
> (const size_t *)(*v4), v5 );
> }
>
> in file "parallel-netcdf-0.8.8/src/libf/put_vara_float_allf.c"
>
> and doing the same thing to other fortran binding functions that need to
> deal with start[], count[], stride[],
> I got the fortran test running successfully.
> And that's why the original ones fails only for put_vara/get_vara:)
>
> Another way may be just using **start, **count, **stride?
>
> But I don't know how to modify these automatically :(
BillG will probably cook up a quick fix for this once he sees the
problem. Until then, I've been trying to keep track of any fixups we
have to do by hand in src/libf/README.fixups
It's not pretty, but at least we won't forget we have to make these
changes...
good work finding the problem, by the way :>
==rob
--
Rob Latham
Mathematics and Computer Science Division A215 0178 EA2D B059 8CDF
Argonne National Labs, IL USA B29D F333 664A 4280 315B
More information about the parallel-netcdf
mailing list