Houston, we have a problem

John Tannahill tannahill1 at llnl.gov
Sat Aug 2 16:24:49 CDT 2003


Jianwei,

Glad you are looking at these things in detail.  Have not gotten
a chance to try 0.8.9 yet.

Regards,
John

Jianwei Li wrote:
> Great!
> 
> I just found another possible problem within the fortran bindings
> when I was looking into the data value written by John's fortran
> test. When writting/reading the array data, the fortran interface
> just passes the buffer starting address to the C interface. However,
> assuming programmers pass fortran memory buffer directly as the argument
> to fortran data access functions, the dimension order will get
> reversed in the data file of the array (the array data in the file
> is always assumed and interpreted in C order).
> 
> So I think, apart from passing the fortran arguments to the C
> interface, there should be something dealing with fortran order
> of dimensions for the memory buffer within the fortran binding
> wrapper. Or should we add another argument in the C functions
> to indicate Fortran/C order of the memory array? Or should this
> dimension order consideration simply be handled by users in their
> applications?
> // I learned that John's fortran test took care of the dimension
> order within the application code :)
> 
> In general, for fortran bindings, we need to handle character-string
> parameter conventions, convert between column-major-order arrays and
> row-major-order arrays, and map between array indices beginning
> at one and array indices beginning at zero.
> // Also, these 1-based/0-based indices were handled by John's fortran
> test code :)
> 
> So there is quite some work to do for the fortran bindings ... ?
> 
> Jianwei
> 
> On Fri, 1 Aug 2003, Robert Latham wrote:
> 
> 
>>On Fri, Aug 01, 2003 at 11:19:23AM -0700, John Tannahill wrote:
>>
>>>Jianwei,
>>>
>>>At first glance, it looks good to me:  diff, delmin, & delmax all 0 and
>>>ncdump is showing reasonable values for tt.  Great work!  Let me know
>>>when I can grab a new release and I will check it out further.
>>
>>ok, i've put a 0.8.9 release out (release anouncement to follow
>>shortly).  This has Jianwei and Bill's changes to the Fortran
>>bindings.  Please try it out and let us know how it works for you.
>>
>>==rob
>>
>>--
>>Rob Latham
>>Mathematics and Computer Science Division    A215 0178 EA2D B059 8CDF
>>Argonne National Labs, IL USA                B29D F333 664A 4280 315B
>>
> 
> 
> 


-- 
       +----------------------------------------------------------------------+
       |                                          John R. Tannahill           |
       |    _/      _/      _/    _/  _/          Lawrence Livermore Nat. Lab |
       |   _/      _/      _/_/  _/  _/           P.O. Box 808, M/S L-103     |
       |  _/      _/      _/  _/_/  _/            Livermore, CA  94551        |
       | _/_/_/  _/_/_/  _/    _/  _/_/_/         Phone:  925-423-3514        |
       |                                          Fax:    925-423-4908        |
       | Lawrence Livermore National Laboratory   Email:  jrt at llnl.gov        |
       +----------------------------------------------------------------------+




More information about the parallel-netcdf mailing list