precision woes

Joachim Worringen joachim at ccrl-nece.de
Fri Jan 30 04:15:53 CST 2004


Some more SX test results: running the tests 'nf_test' and 'nc_test' on SX-6 
systems reported a lot of errors. 

After being quite sure that our MPI-IO is alright and testing on Linux IA-32, 
I assumed that there may be some 32/64 bit issues, probably in the test 
programs themselves. Here we go - the proposed fixes worked for me, but maybe 
won't work for others (?), although I do not see why this could be the case.

- test/nc_test/test_get.c and test_put.c: ptrdiff_t is used to pass arrays of 
size_t values to pnetcdf -> on SX, ptrdiff_t is 64bit, while size_t is 32 bit
Fix: replace all ptrdiff_t by size_t

- pnetcdf.h: defines NC_UNLIMITED to '0L' - this is 64bit on SX, but is passed 
as 32-bit size_t value
Fix: define to 0, not 0L 

- 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(). 

I still have some numerical issues in the testing of real values, though:

*** Testing nfmpi_put_att_real ...
 Numeric conversion not representable

 att. value read not that expected

 varid:   0
 att_name: Gd
 element number:   3
 expect:   -7.812501848093234D-03
 got:   -7.812500000000000D-03

 2   good comparisons.


   ###   43   FAILURES TESTING nfmpi_put_att_real! ###

The related test in nc_test does not cause these problems. Any hints? I guess 
it's related to the SX-f90 compiler, though.

What about these tests on other 64-bit platforms - anybody?

 Joachim

-- 
Joachim Worringen - NEC C&C research lab St.Augustin
fon +49-2241-9252.20 - fax .99 - http://www.ccrl-nece.de




More information about the parallel-netcdf mailing list