diff options
author | Elena Pourmal <epourmal@hdfgroup.org> | 2005-09-17 23:43:27 (GMT) |
---|---|---|
committer | Elena Pourmal <epourmal@hdfgroup.org> | 2005-09-17 23:43:27 (GMT) |
commit | f8e70642695ffe44e299b8e68f4df1e743408470 (patch) | |
tree | 56f1a1983ccdd7ddb4d3d1e5f4a630a8960db2f8 /fortran | |
parent | 2540abc1c93d7059bfee696ffcaa577fd628d174 (diff) | |
download | hdf5-f8e70642695ffe44e299b8e68f4df1e743408470.zip hdf5-f8e70642695ffe44e299b8e68f4df1e743408470.tar.gz hdf5-f8e70642695ffe44e299b8e68f4df1e743408470.tar.bz2 |
[svn-r11427] Purpose: SX-6 port
Description:
Fortran multi_file test failed on SX-6. It turned out that compiler
could not handle (long long HADDR_MAX) * ( float var). The result of this
operation was 0.
Solution:
Introduced long double variable to store the value of HADDR_MAX
and use the new variable in * operation. (Suggested by John)
Platforms tested: SX-6, mir with PGI compilers; a very minor change
Misc. update:
Diffstat (limited to 'fortran')
-rw-r--r-- | fortran/src/H5Pf.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fortran/src/H5Pf.c b/fortran/src/H5Pf.c index 91508c0..b89ca12 100644 --- a/fortran/src/H5Pf.c +++ b/fortran/src/H5Pf.c @@ -2899,6 +2899,7 @@ nh5pset_fapl_multi_c ( hid_t_f *prp_id , int_f *memb_map, hid_t_f *memb_fapl, _f int c_lenmax; c_lenmax = (int)*lenmax; relax = (hbool_t)*flag; + long double tmp_max_addr; /* * Check that we got correct values from Fortran for memb_addr array */ @@ -2925,7 +2926,7 @@ nh5pset_fapl_multi_c ( hid_t_f *prp_id , int_f *memb_map, hid_t_f *memb_fapl, _f /* * Take care of othe arguments */ - + tmp_max_addr = (long double)(HADDR_MAX); c_prp_id = (hid_t)*prp_id; for (i=0; i < H5FD_MEM_NTYPES; i++) { c_memb_map[i] = (H5FD_mem_t)memb_map[i]; @@ -2933,7 +2934,8 @@ nh5pset_fapl_multi_c ( hid_t_f *prp_id , int_f *memb_map, hid_t_f *memb_fapl, _f c_memb_fapl[i] = (hid_t)memb_fapl[i]; /*printf("fapl %d \n", c_memb_fapl[i]); */ if(memb_addr[i] < 0) c_memb_addr[i] = HADDR_UNDEF; - else c_memb_addr[i] = (haddr_t)(((float)memb_addr[i])*(HADDR_MAX)); + /* else c_memb_addr[i] = (haddr_t)(((float)memb_addr[i])*(HADDR_MAX));*/ + else c_memb_addr[i] = (haddr_t)(((float)memb_addr[i])*(tmp_max_addr)); /*printf("address %Ld \n", c_memb_addr[i]); */ } /* |