mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-02-17 16:10:24 +08:00
[svn-r13242] Bug fix.
It was hardcoded to use /tmp/... as the default test file name. Changed it to use $HDF5_PARAPREFIX/... to compose the test file name. Platform Tested: tg-ncsa since it failed there. (Will test other platforms after commit.)
This commit is contained in:
parent
c560e68258
commit
4e57d80f2e
@ -22,10 +22,11 @@
|
||||
IMPLICIT NONE
|
||||
|
||||
INCLUDE 'mpif.h'
|
||||
! Hard coded the file name. Change it according to where your PFS is.
|
||||
CHARACTER(LEN=20), PARAMETER :: filename = "/tmp/sds.h5" ! File name
|
||||
CHARACTER(LEN=10), PARAMETER :: default_fname = "sds.h5" ! Default name
|
||||
CHARACTER(LEN=8), PARAMETER :: dsetname = "IntArray" ! Dataset name
|
||||
|
||||
CHARACTER(LEN=100) :: filename ! File name
|
||||
INTEGER :: fnamelen ! File name length
|
||||
INTEGER(HID_T) :: file_id ! File identifier
|
||||
INTEGER(HID_T) :: dset_id ! Dataset identifier
|
||||
INTEGER(HID_T) :: filespace ! Dataspace identifier in file
|
||||
@ -72,6 +73,19 @@
|
||||
CALL h5pcreate_f(H5P_FILE_ACCESS_F, plist_id, error)
|
||||
CALL h5pset_fapl_mpio_f(plist_id, comm, info, error)
|
||||
|
||||
!
|
||||
! Figure out the filename to use. If your system does not support
|
||||
! getenv, comment that statement with this,
|
||||
! filename = ""
|
||||
CALL getenv("HDF5_PARAPREFIX", filename)
|
||||
fnamelen = LEN_TRIM(filename)
|
||||
if ( fnamelen == 0 ) then
|
||||
filename = default_fname
|
||||
else
|
||||
filename = filename(1:fnamelen) // "/" // default_fname
|
||||
endif
|
||||
print *, "Using filename = ", filename
|
||||
|
||||
!
|
||||
! Create the file collectively.
|
||||
!
|
||||
|
Loading…
Reference in New Issue
Block a user