Skip to content

Commit 7948642

Browse files
committed
Add support for HDF5 1.14.x
1 parent f7b64f1 commit 7948642

File tree

7 files changed

+14
-113
lines changed

7 files changed

+14
-113
lines changed

prog/fortnet/lib_descriptors/acsf.F90

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
module fnet_acsf
1212

1313
use h5lt
14-
use hdf5
1514

1615
use dftbp_accuracy, only : dp
1716
use dftbp_message, only : error
@@ -1780,9 +1779,6 @@ subroutine TAcsf_toFile(this, fname)
17801779
!! auxiliary variables
17811780
integer :: iFunc, iErr, tmp, tExist
17821781

1783-
! open the hdf5 interface
1784-
call h5open_f(iErr)
1785-
17861782
! open the netstat file
17871783
call h5fopen_f(fname, H5F_ACC_RDWR_F, file_id, iErr)
17881784

@@ -1905,9 +1901,6 @@ subroutine TAcsf_toFile(this, fname)
19051901
! close the netstat file
19061902
call h5fclose_f(file_id, iErr)
19071903

1908-
! close the hdf5 interface
1909-
call h5close_f(iErr)
1910-
19111904
end subroutine TAcsf_toFile
19121905

19131906

@@ -1944,9 +1937,6 @@ subroutine TAcsf_fromFile(this, fname, tReduce, tStandardize, nRadial, nAngular)
19441937
real(dp), allocatable :: tmpRealArray1d(:)
19451938
integer :: iFunc, iErr, tExist, tmpInt(1)
19461939

1947-
! open the hdf5 interface
1948-
call h5open_f(iErr)
1949-
19501940
! open the netstat file
19511941
call h5fopen_f(fname, H5F_ACC_RDONLY_F, file_id, iErr)
19521942

@@ -2118,9 +2108,6 @@ subroutine TAcsf_fromFile(this, fname, tReduce, tStandardize, nRadial, nAngular)
21182108
! close the netstat file
21192109
call h5fclose_f(file_id, iErr)
21202110

2121-
! close the hdf5 interface
2122-
call h5close_f(iErr)
2123-
21242111
nRadial = 0
21252112
nAngular = 0
21262113
allocate(tmpAtomicNumbers(0))

prog/fortnet/lib_fortnet/initprogram.F90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,7 @@ subroutine readDriverBlock(driver, analysis, driverNode, parent)
594594

595595
type(fnode), pointer :: child, child2, child3, child4, value1, field
596596

597-
type(string) :: buffer, buffer2, modifier
597+
type(string) :: buffer, buffer2
598598

599599
!! string buffer instance
600600
type(string) :: strBuffer

prog/fortnet/lib_io/fnetdata.F90

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
module fnet_fnetdata
1212

1313
use h5lt
14-
use hdf5
1514

1615
use dftbp_assert
1716
use dftbp_accuracy, only: dp, mc
@@ -557,9 +556,6 @@ subroutine inquireStructures(fname, tStructures)
557556
!! auxiliary variable
558557
integer :: iErr
559558

560-
! open the hdf5 interface
561-
call h5open_f(iErr)
562-
563559
! open the dataset file
564560
call h5fopen_f(fname, H5F_ACC_RDONLY_F, file_id, iErr)
565561

@@ -573,9 +569,6 @@ subroutine inquireStructures(fname, tStructures)
573569
! close the dataset file
574570
call h5fclose_f(file_id, iErr)
575571

576-
! close the hdf5 interface
577-
call h5close_f(iErr)
578-
579572
end subroutine inquireStructures
580573

581574

@@ -606,9 +599,6 @@ subroutine inquireTargets(fname, tGlobalTargets, tAtomicTargets, nGlobalTargets,
606599
!! auxiliary variables
607600
integer :: iErr
608601

609-
! open the hdf5 interface
610-
call h5open_f(iErr)
611-
612602
! open the dataset file
613603
call h5fopen_f(fname, H5F_ACC_RDONLY_F, file_id, iErr)
614604

@@ -639,9 +629,6 @@ subroutine inquireTargets(fname, tGlobalTargets, tAtomicTargets, nGlobalTargets,
639629
! close the dataset file
640630
call h5fclose_f(file_id, iErr)
641631

642-
! close the hdf5 interface
643-
call h5close_f(iErr)
644-
645632
end subroutine inquireTargets
646633

647634

@@ -666,9 +653,6 @@ subroutine inquireExtFeatures(fname, tFeatures, nFeatures)
666653
!! auxiliary variables
667654
integer :: iErr
668655

669-
! open the hdf5 interface
670-
call h5open_f(iErr)
671-
672656
! open the dataset file
673657
call h5fopen_f(fname, H5F_ACC_RDONLY_F, file_id, iErr)
674658

@@ -687,9 +671,6 @@ subroutine inquireExtFeatures(fname, tFeatures, nFeatures)
687671
! close the dataset file
688672
call h5fclose_f(file_id, iErr)
689673

690-
! close the hdf5 interface
691-
call h5close_f(iErr)
692-
693674
end subroutine inquireExtFeatures
694675

695676

@@ -1033,9 +1014,6 @@ subroutine readHdfDataset(fname, dataset)
10331014
!! auxiliary variables
10341015
integer :: iErr, iDatapoint, tExist
10351016

1036-
! open the hdf5 interface
1037-
call h5open_f(iErr)
1038-
10391017
! open the dataset file
10401018
call h5fopen_f(fname, H5F_ACC_RDONLY_F, file_id, iErr)
10411019

@@ -1232,9 +1210,6 @@ subroutine readHdfDataset(fname, dataset)
12321210
! close the dataset file
12331211
call h5fclose_f(file_id, iErr)
12341212

1235-
! close the hdf5 interface
1236-
call h5close_f(iErr)
1237-
12381213
! perform some basic consistency checks
12391214
call dataset%checkConsistency()
12401215

prog/fortnet/lib_io/fnetout.F90

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
module fnet_fnetout
1212

1313
use h5lt
14-
use hdf5
1514

1615
use dftbp_message, only : error
1716
use dftbp_accuracy, only: dp
@@ -75,9 +74,6 @@ subroutine writeFnetout(fname, mode, globalTargets, atomicTargets, output, force
7574
call error('Validation mode only valid in combination with target data.')
7675
end if
7776

78-
! open the hdf5 interface
79-
call h5open_f(iErr)
80-
8177
! create the fnetout file
8278
call h5fcreate_f(fname, H5F_ACC_TRUNC_F, file_id, iErr)
8379

@@ -159,9 +155,6 @@ subroutine writeFnetout(fname, mode, globalTargets, atomicTargets, output, force
159155
! close the fnetout file
160156
call h5fclose_f(file_id, iErr)
161157

162-
! close the hdf5 interface
163-
call h5close_f(iErr)
164-
165158
end subroutine writeFnetout
166159

167160
end module fnet_fnetout

prog/fortnet/lib_io/netstat.F90

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
module fnet_netstat
1212

1313
use h5lt
14-
use hdf5
1514

1615
use dftbp_message, only : error
1716
use dftbp_charmanip, only : i2c, tolower
@@ -46,9 +45,6 @@ subroutine createNetstat(fname)
4645
!! auxiliary variable
4746
integer :: iErr
4847

49-
! open the hdf5 interface
50-
call h5open_f(iErr)
51-
5248
! create the netstat file
5349
call h5fcreate_f(fname, H5F_ACC_TRUNC_F, file_id, iErr)
5450

@@ -61,9 +57,6 @@ subroutine createNetstat(fname)
6157
! close the netstat file
6258
call h5fclose_f(file_id, iErr)
6359

64-
! close the hdf5 interface
65-
call h5close_f(iErr)
66-
6760
end subroutine createNetstat
6861

6962

@@ -82,9 +75,6 @@ subroutine inquireExtFeatures(fname, tExtFeatures)
8275
!! auxiliary variables
8376
integer :: iErr, tExist, tmp(1)
8477

85-
! open the hdf5 interface
86-
call h5open_f(iErr)
87-
8878
! open the netstat file
8979
call h5fopen_f(fname, H5F_ACC_RDONLY_F, file_id, iErr)
9080

@@ -116,9 +106,6 @@ subroutine inquireExtFeatures(fname, tExtFeatures)
116106
! close the netstat file
117107
call h5fclose_f(file_id, iErr)
118108

119-
! close the hdf5 interface
120-
call h5close_f(iErr)
121-
122109
end subroutine inquireExtFeatures
123110

124111

@@ -138,9 +125,6 @@ subroutine inquireAcsf(fname, tAcsf)
138125
character(len=100) :: tmpStr
139126
integer :: iErr, tExist
140127

141-
! open the hdf5 interface
142-
call h5open_f(iErr)
143-
144128
! open the netstat file
145129
call h5fopen_f(fname, H5F_ACC_RDONLY_F, file_id, iErr)
146130

@@ -172,9 +156,6 @@ subroutine inquireAcsf(fname, tAcsf)
172156
! close the netstat file
173157
call h5fclose_f(file_id, iErr)
174158

175-
! close the hdf5 interface
176-
call h5close_f(iErr)
177-
178159
end subroutine inquireAcsf
179160

180161

@@ -193,9 +174,6 @@ subroutine readExtFeaturesConfig(fname, ext)
193174
!! auxiliary variables
194175
integer :: iErr, tExist, tmp(1)
195176

196-
! open the hdf5 interface
197-
call h5open_f(iErr)
198-
199177
! open the netstat file
200178
call h5fopen_f(fname, H5F_ACC_RDONLY_F, file_id, iErr)
201179

@@ -230,9 +208,6 @@ subroutine readExtFeaturesConfig(fname, ext)
230208
! close the netstat file
231209
call h5fclose_f(file_id, iErr)
232210

233-
! close the hdf5 interface
234-
call h5close_f(iErr)
235-
236211
end subroutine readExtFeaturesConfig
237212

238213

@@ -273,9 +248,6 @@ subroutine readSubnetArchitecture(fname, type, activation, topology)
273248
! currently only the BPNN topology is supported
274249
type = 'bpnn'
275250

276-
! open the hdf5 interface
277-
call h5open_f(iErr)
278-
279251
! open the netstat file
280252
call h5fopen_f(fname, H5F_ACC_RDONLY_F, file_id, iErr)
281253

@@ -333,9 +305,6 @@ subroutine readSubnetArchitecture(fname, type, activation, topology)
333305
! close the netstat file
334306
call h5fclose_f(file_id, iErr)
335307

336-
! close the hdf5 interface
337-
call h5close_f(iErr)
338-
339308
end subroutine readSubnetArchitecture
340309

341310

@@ -364,9 +333,6 @@ subroutine writeBpnnHeader(fname, bpnn, nGlobalTargets, nAtomicTargets)
364333
integer(hsize_t) :: dims(1)
365334
integer :: iErr, iNet, iLayer
366335

367-
! open the hdf5 interface
368-
call h5open_f(iErr)
369-
370336
! open the netstat file
371337
call h5fopen_f(fname, H5F_ACC_RDWR_F, file_id, iErr)
372338

@@ -433,9 +399,6 @@ subroutine writeBpnnHeader(fname, bpnn, nGlobalTargets, nAtomicTargets)
433399
! close the netstat file
434400
call h5fclose_f(file_id, iErr)
435401

436-
! close the hdf5 interface
437-
call h5close_f(iErr)
438-
439402
end subroutine writeBpnnHeader
440403

441404

@@ -455,9 +418,6 @@ subroutine writeExtFeaturesConfig(fname, ext)
455418
integer(hsize_t) :: dim
456419
integer :: iErr, tExist
457420

458-
! open the hdf5 interface
459-
call h5open_f(iErr)
460-
461421
! open the netstat file
462422
call h5fopen_f(fname, H5F_ACC_RDWR_F, file_id, iErr)
463423

@@ -490,9 +450,6 @@ subroutine writeExtFeaturesConfig(fname, ext)
490450
! close the netstat file
491451
call h5fclose_f(file_id, iErr)
492452

493-
! close the hdf5 interface
494-
call h5close_f(iErr)
495-
496453
end subroutine writeExtFeaturesConfig
497454

498455
end module fnet_netstat

prog/fortnet/lib_nn/bpnn.F90

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
module fnet_bpnn
1212

1313
use h5lt
14-
use hdf5
1514

1615
use dftbp_message, only : error
1716
use dftbp_globalenv, only : stdOut
@@ -1077,9 +1076,6 @@ subroutine TBpnn_toFile(this, fname)
10771076
!! auxiliary variables
10781077
integer :: iErr, iNet, iLayer, tExist
10791078

1080-
! open the hdf5 interface
1081-
call h5open_f(iErr)
1082-
10831079
! open the netstat file
10841080
call h5fopen_f(fname, H5F_ACC_RDWR_F, file_id, iErr)
10851081

@@ -1138,9 +1134,6 @@ subroutine TBpnn_toFile(this, fname)
11381134
! close the netstat file
11391135
call h5fclose_f(file_id, iErr)
11401136

1141-
! close the hdf5 interface
1142-
call h5close_f(iErr)
1143-
11441137
end subroutine TBpnn_toFile
11451138

11461139

@@ -1181,9 +1174,6 @@ subroutine TBpnn_fromFile(this, fname)
11811174
!! auxiliary variables
11821175
integer :: iErr, iNet, iLayer
11831176

1184-
! open the hdf5 interface
1185-
call h5open_f(iErr)
1186-
11871177
! open the netstat file
11881178
call h5fopen_f(fname, H5F_ACC_RDONLY_F, file_id, iErr)
11891179

@@ -1295,9 +1285,6 @@ subroutine TBpnn_fromFile(this, fname)
12951285
! close the netstat file
12961286
call h5fclose_f(file_id, iErr)
12971287

1298-
! close the hdf5 interface
1299-
call h5close_f(iErr)
1300-
13011288
end subroutine TBpnn_fromFile
13021289

13031290
end module fnet_bpnn

0 commit comments

Comments
 (0)