precision woes
Joachim Worringen
joachim at ccrl-nece.de
Mon Feb 2 08:07:42 CST 2004
William Gropp:
> Thanks for the fixes. This is certainly the correct fix for the way that
> the ncmpi_xxx routines are defined (they take size_t and never
> ptrdiff_t). What we need to look at is whether the ncmpi_xxx routines
> should use ptrdiff_t in the way that the test programs used the value. In
> other words, is the ncmpi binding wrong or is the test program wrong? We
> should strive to minimize the differences with regular netCDF.
Well, in the pnetcdf API document from the web, MPI_Offset is used throughout
the API instead of size_t - but pnetcdf.h (from 0.9.3) still uses size_t.
Some agreement is definitely required, and I would support a definition which
uses 64bit-Values throughout (MPI_Offset does so, at least on all 64-bit
platforms, and most 32-bit platforms if compiled accordingly). As MPI is
required for pnetcdf, this seems to be much better a solution than size_t
which often is only 32 bit (sometimes signed).
> It might be best instead for use to cast it to the right type ((size_t)0),
> since we might need the long on some platforms (though a good compiler
> should handle the cast for us because of the prototype).
Agreed. But not size_t...
> >- test/nf_test/test_put.F: in the functions hash_real(), check_vars_real()
> >and
> >check_atts_real(), I had to replace the 'doubleprecision' declarations by
> >'real' to avoid (bogus!?) error messages. I am not Fortran-expert, though,
> >and am still wondering why these 'doubleprecision' declarations do not
> > cause such problems in functions like check_vars_int().
>
> What messages did you get?
Currently, with most issues in nf_test fixed, I still get this error message
on our local SX-6i (mpirun ... nf_test -v):
*** Testing nfmpi_put_att_real ...
ERROR 2
Numeric conversion not representable
8 good comparisons.
### 1 FAILURES TESTING nfmpi_put_att_real! ###
A diff of my current fixes to nf_test, and the output of the original nf_test
(*without* these fixes) are attached.
Joachim
--
Joachim Worringen - NEC C&C research lab St.Augustin
fon +49-2241-9252.20 - fax .99 - http://www.ccrl-nece.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nf_test.err
Type: text/x-diff
Size: 6576 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/parallel-netcdf/attachments/20040202/82562ecf/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nf_test.patch
Type: text/x-diff
Size: 2285 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/parallel-netcdf/attachments/20040202/82562ecf/attachment-0001.bin>
More information about the parallel-netcdf
mailing list