Skip to content

Commit 465c6a3

Browse files
authored
Merge pull request #89 from vanderhe/hdf5Support1.14.x
Add support for HDF5 1.14.x
2 parents f7b64f1 + 6605fa3 commit 465c6a3

File tree

8 files changed

+33
-143
lines changed

8 files changed

+33
-143
lines changed

.github/workflows/build.yml

Lines changed: 19 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -107,17 +107,12 @@ jobs:
107107
os: [ubuntu-latest]
108108
mpi: [nompi]
109109
socket: [nosocket, socket]
110-
fc: [ifort]
110+
fc: [ifx]
111111
cc: [icx]
112112
env:
113113
FC: ${{ matrix.fc }}
114114
CC: ${{ matrix.cc }}
115115
WITH_MPI: false
116-
APT_PACKAGES: >-
117-
intel-oneapi-compiler-fortran
118-
intel-oneapi-compiler-dpcpp-cpp
119-
intel-oneapi-mkl
120-
intel-oneapi-mkl-devel
121116
CMAKE_OPTIONS: >-
122117
-DCMAKE_BUILD_TYPE=RelWithDebInfo
123118
-DFYPP_FLAGS='-DTRAVIS'
@@ -131,34 +126,28 @@ jobs:
131126
with:
132127
python-version: 3.x
133128

134-
- name: Add Intel repository
135-
if: contains(matrix.os, 'ubuntu')
136-
run: |
137-
wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null
138-
echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
139-
sudo apt-get update
129+
- name: Setup Intel compiler
130+
uses: rscohn2/setup-oneapi@v0
131+
with:
132+
components: |
133+
134+
135+
140136
141-
- name: Install Intel oneAPI compiler
142-
if: contains(matrix.os, 'ubuntu')
137+
- name: Setup Intel environment
143138
run: |
144-
sudo apt-get update
145-
sudo apt-get install ${APT_PACKAGES}
146139
source /opt/intel/oneapi/setvars.sh
147-
printenv >> $GITHUB_ENV
140+
printenv >> ${GITHUB_ENV}
141+
echo "FC=ifx" >> ${GITHUB_ENV}
142+
echo "CC=icx" >> ${GITHUB_ENV}
148143
149-
- name: Install HDF5 (gcc)
150-
if: contains(matrix.os, 'ubuntu')
151-
run: |
152-
sudo apt-get update
153-
sudo apt-get install hdf5-tools libhdf5-dev libhdf5-103
154-
155-
- name: Install HDF5 (intel)
144+
- name: Install HDF5
156145
if: contains(matrix.os, 'ubuntu')
157146
run: |
158-
wget https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.13/hdf5-1.13.2/src/CMake-hdf5-1.13.2.tar.gz
159-
tar xfz CMake-hdf5-1.13.2.tar.gz
160-
cd CMake-hdf5-1.13.2/hdf5-1.13.2/
161-
CC=icx CXX=icx FC=ifort F9X=ifort ./configure --prefix=${PWD}/hdf5 --enable-fortran --with-default-api-version=v110 --enable-shared
147+
wget https://support.hdfgroup.org/releases/hdf5/v1_14/v1_14_4/downloads/hdf5-1.14.4-3.tar.gz
148+
tar xfz hdf5-1.14.4-3.tar.gz
149+
cd hdf5-1.14.4-3/
150+
CC=icx CXX=icx FC=ifx F9X=ifx ./configure --prefix=${PWD}/hdf5 --enable-fortran --enable-shared
162151
make -j -l2
163152
make install
164153
export HDF5_ROOT=${PWD}/hdf5
@@ -169,7 +158,7 @@ jobs:
169158
if: contains(matrix.mpi, 'nompi')
170159
run: |
171160
echo "WITH_MPI=false" >> $GITHUB_ENV
172-
echo "FC=ifort" >> $GITHUB_ENV
161+
echo "FC=ifx" >> $GITHUB_ENV
173162
174163
- name: Enable socket build
175164
if: contains(matrix.socket, 'socket')
@@ -198,7 +187,7 @@ jobs:
198187
- name: Run regression tests
199188
run: |
200189
pushd ${BUILD_DIR}
201-
ctest -j 2 --output-on-failure
190+
ctest -j2 --output-on-failure
202191
popd
203192
204193
- name: Install project

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

0 commit comments

Comments
 (0)