@@ -77,14 +77,17 @@ module h5mpi
77
77
hdf5version, HSIZE_T
78
78
79
79
interface ! < write.f90
80
- module subroutine hdf_create (self , dname , dtype , mem_dims , dset_dims , filespace , memspace , dset_id , istart , iend , chunk_size )
80
+ module subroutine hdf_create (self , dname , dtype , mem_dims , dset_dims , filespace , memspace , dset_id , &
81
+ istart , iend , chunk_size , compact )
82
+
81
83
class(hdf5_file), intent (inout ) :: self
82
84
character (* ), intent (in ) :: dname
83
85
integer (HID_T), intent (in ) :: dtype
84
86
integer (HSIZE_T), dimension (:), intent (in ) :: mem_dims, dset_dims
85
87
integer (HID_T), intent (out ), optional :: filespace, memspace, dset_id
86
88
integer (HSIZE_T), dimension (:), intent (in ), optional :: istart, iend
87
89
integer , dimension (:), intent (in ), optional :: chunk_size
90
+ logical , intent (in ), optional :: compact
88
91
end subroutine hdf_create
89
92
end interface
90
93
@@ -97,73 +100,81 @@ end subroutine get_hdf5_config
97
100
98
101
interface ! < writer.f90
99
102
100
- module subroutine h5write_scalar (self , dname , value )
103
+ module subroutine h5write_scalar (self , dname , value , compact )
101
104
class(hdf5_file), intent (inout ) :: self
102
105
character (* ), intent (in ) :: dname
103
106
class(* ), intent (in ) :: value
107
+ logical , intent (in ), optional :: compact
104
108
end subroutine h5write_scalar
105
109
106
- module subroutine ph5write_1d (self , dname , value , dset_dims , istart , iend , chunk_size )
110
+ module subroutine ph5write_1d (self , dname , value , dset_dims , istart , iend , chunk_size , compact )
107
111
class(hdf5_file), intent (inout ) :: self
108
112
character (* ), intent (in ) :: dname
109
113
class(* ), intent (in ) :: value(:)
110
114
class(* ), intent (in ), dimension (1 ), optional :: dset_dims ! < integer or integer(HSIZE_T) full disk shape (not just per worker)
111
115
integer (HSIZE_T), intent (in ), dimension (1 ), optional :: istart, iend
112
116
integer , intent (in ), dimension (1 ), optional :: chunk_size
117
+ logical , intent (in ), optional :: compact
113
118
end subroutine ph5write_1d
114
119
115
- module subroutine ph5write_2d (self , dname , value , dset_dims , istart , iend , chunk_size )
120
+ module subroutine ph5write_2d (self , dname , value , dset_dims , istart , iend , chunk_size , compact )
116
121
class(hdf5_file), intent (inout ) :: self
117
122
character (* ), intent (in ) :: dname
118
123
class(* ), intent (in ) :: value(:,:)
119
124
class(* ), intent (in ), dimension (2 ), optional :: dset_dims
120
125
integer (HSIZE_T), intent (in ), dimension (2 ), optional :: istart, iend
121
126
integer , intent (in ), dimension (2 ), optional :: chunk_size
127
+ logical , intent (in ), optional :: compact
122
128
end subroutine ph5write_2d
123
129
124
- module subroutine ph5write_3d (self , dname , value , dset_dims , istart , iend , chunk_size )
130
+ module subroutine ph5write_3d (self , dname , value , dset_dims , istart , iend , chunk_size , compact )
125
131
class(hdf5_file), intent (inout ) :: self
126
132
character (* ), intent (in ) :: dname
127
133
class(* ), intent (in ) :: value(:,:,:)
128
134
class(* ), intent (in ), dimension (3 ), optional :: dset_dims
129
135
integer (HSIZE_T), intent (in ), dimension (3 ), optional :: istart, iend
130
136
integer , intent (in ), dimension (3 ), optional :: chunk_size
137
+ logical , intent (in ), optional :: compact
131
138
end subroutine ph5write_3d
132
139
133
- module subroutine ph5write_4d (self , dname , value , dset_dims , istart , iend , chunk_size )
140
+ module subroutine ph5write_4d (self , dname , value , dset_dims , istart , iend , chunk_size , compact )
134
141
class(hdf5_file), intent (inout ) :: self
135
142
character (* ), intent (in ) :: dname
136
143
class(* ), intent (in ) :: value(:,:,:,:)
137
144
class(* ), intent (in ), dimension (4 ), optional :: dset_dims
138
145
integer (HSIZE_T), intent (in ), dimension (4 ), optional :: istart, iend
139
146
integer , intent (in ), dimension (4 ), optional :: chunk_size
147
+ logical , intent (in ), optional :: compact
140
148
end subroutine ph5write_4d
141
149
142
- module subroutine ph5write_5d (self , dname , value , dset_dims , istart , iend , chunk_size )
150
+ module subroutine ph5write_5d (self , dname , value , dset_dims , istart , iend , chunk_size , compact )
143
151
class(hdf5_file), intent (inout ) :: self
144
152
character (* ), intent (in ) :: dname
145
153
class(* ), intent (in ) :: value(:,:,:,:,:)
146
154
class(* ), intent (in ), dimension (5 ), optional :: dset_dims
147
155
integer (HSIZE_T), intent (in ), dimension (5 ), optional :: istart, iend
148
156
integer , intent (in ), dimension (5 ), optional :: chunk_size
157
+ logical , intent (in ), optional :: compact
149
158
end subroutine ph5write_5d
150
159
151
- module subroutine ph5write_6d (self , dname , value , dset_dims , istart , iend , chunk_size )
160
+ module subroutine ph5write_6d (self , dname , value , dset_dims , istart , iend , chunk_size , compact )
152
161
class(hdf5_file), intent (inout ) :: self
153
162
character (* ), intent (in ) :: dname
154
163
class(* ), intent (in ) :: value(:,:,:,:,:,:)
155
164
class(* ), intent (in ), dimension (6 ), optional :: dset_dims
156
165
integer (HSIZE_T), intent (in ), dimension (6 ), optional :: istart, iend
157
166
integer , intent (in ), dimension (6 ), optional :: chunk_size
167
+ logical , intent (in ), optional :: compact
158
168
end subroutine ph5write_6d
159
169
160
- module subroutine ph5write_7d (self , dname , value , dset_dims , istart , iend , chunk_size )
170
+ module subroutine ph5write_7d (self , dname , value , dset_dims , istart , iend , chunk_size , compact )
161
171
class(hdf5_file), intent (inout ) :: self
162
172
character (* ), intent (in ) :: dname
163
173
class(* ), intent (in ) :: value(:,:,:,:,:,:,:)
164
174
class(* ), intent (in ), dimension (7 ), optional :: dset_dims
165
175
integer (HSIZE_T), intent (in ), dimension (7 ), optional :: istart, iend
166
176
integer , intent (in ), dimension (7 ), optional :: chunk_size
177
+ logical , intent (in ), optional :: compact
167
178
end subroutine ph5write_7d
168
179
169
180
end interface
@@ -587,17 +598,16 @@ function hdf5version() result(v)
587
598
end function hdf5version
588
599
589
600
590
- subroutine hdf_flush (self , ierr )
601
+ subroutine hdf_flush (self )
591
602
! ! request operating system flush data to disk.
592
603
! ! The operating system can do this when it desires, which might be a while.
593
604
class(hdf5_file), intent (in ) :: self
594
- integer , intent (out ), optional :: ierr
595
- integer :: ier
596
605
597
- call h5fflush_f(self% file_id, H5F_SCOPE_GLOBAL_F, ier)
606
+ integer :: ierr
607
+
608
+ call h5fflush_f(self% file_id, H5F_SCOPE_GLOBAL_F, ierr)
598
609
599
- if (present (ierr)) ierr = ier
600
- if (check(ier, ' ERROR: HDF5 flush ' // self% filename) .and. .not. present (ierr)) error stop
610
+ if (ierr /= 0 ) error stop ' ERROR: HDF5 flush ' // self% filename
601
611
602
612
end subroutine hdf_flush
603
613
0 commit comments