Skip to content

Commit 169f4bf

Browse files
committed
Squashed commit of the following:
commit c7ee3ba Author: Michael Hirsch, Ph.D <[email protected]> Date: Mon Apr 9 23:54:33 2018 -0400 doc commit c083773 Author: Michael Hirsch, Ph.D <[email protected]> Date: Mon Apr 9 23:33:50 2018 -0400 real64 read commit 595b031 Author: Michael Hirsch, Ph.D <[email protected]> Date: Mon Apr 9 23:29:22 2018 -0400 stub real32 read commit 3de9d3d Author: Michael Hirsch, Ph.D <[email protected]> Date: Mon Apr 9 23:24:25 2018 -0400 write real32/64 commit 76504ea Author: Michael Hirsch, Ph.D <[email protected]> Date: Mon Apr 9 23:04:52 2018 -0400 per variable chunk_size, up to 6-d array (more possible) commit d31e4d9 Author: Michael Hirsch, Ph.D <[email protected]> Date: Mon Apr 9 22:47:57 2018 -0400 cleanup attribute write commit da47ec3 Author: Michael Hirsch, Ph.D <[email protected]> Date: Mon Apr 9 22:26:42 2018 -0400 dedupe commit 6817f9a Author: Michael Hirsch, Ph.D <[email protected]> Date: Mon Apr 9 22:24:42 2018 -0400 functionalize wrapup commit 46b8c98 Author: Michael Hirsch, Ph.D <[email protected]> Date: Mon Apr 9 22:19:12 2018 -0400 use self% properties commit 25e5b4a Author: Michael Hirsch, Ph.D <[email protected]> Date: Mon Apr 9 21:54:24 2018 -0400 function deflate commit a1ff185 Author: Michael Hirsch, Ph.D <[email protected]> Date: Mon Apr 9 21:51:25 2018 -0400 function rename
1 parent 261453a commit 169f4bf

File tree

4 files changed

+537
-243
lines changed

4 files changed

+537
-243
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@ Abstracts away the messy parts of HDF5 so that you can read/write various types/
88
Polymorphic API with read/write integer / real32/64:
99

1010
* scalar
11-
* 1-D
12-
* 2-D
13-
* 3-D
11+
* 1-D .. 6-D
1412

1513
as well as character (string) variables and attributes.
1614
If you'd like higher-rank arrays, let us know via GitHub Issue.
@@ -43,6 +41,8 @@ make
4341
make test
4442
```
4543

44+
The library `libh5oo` is built, link it into your program as usual.
45+
4646
## Usage
4747

4848
All examples assume:
@@ -84,7 +84,7 @@ call h5f%finalize()
8484
8585
real :: val2(1000,1000,3) = 0.
8686
87-
call h5f%initialize('test.h5',status='old',action='rw', comp_lvl=1)
87+
call h5f%initialize('test.h5', comp_lvl=1)
8888
8989
call h5f%add('/value2', val2)
9090

src/CMakeLists.txt

Lines changed: 7 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,11 @@ project(hdf5iface Fortran)
44

55
if(${CMAKE_Fortran_COMPILER_ID} STREQUAL Intel)
66
list(APPEND FFLAGS -check all -traceback -warn -debug extended)
7-
set(F64 -r8)
87
elseif(${CMAKE_Fortran_COMPILER_ID} STREQUAL GNU)
98
if(${CMAKE_Fortran_COMPILER_VERSION} VERSION_LESS 5.4.1)
109
message(ERROR " gfortran >= 5.4.1 required, you have " ${CMAKE_Fortran_COMPILER_VERSION})
1110
endif()
1211
list(APPEND FFLAGS -std=f2008ts -march=native -Wall -Wextra -Wpedantic -Werror=array-bounds -fbacktrace -fcheck=all)
13-
set(F64 -fdefault-real-8)
1412
endif()
1513

1614
add_compile_options(-O3 -g ${FFLAGS})
@@ -21,29 +19,15 @@ find_package(HDF5 REQUIRED COMPONENTS Fortran Fortran_HL)
2119
include_directories(${HDF5_INCLUDE_DIRS} ${HDF5_Fortran_INCLUDE_DIRS})
2220

2321

24-
add_library(hdf5iface_32 hdf5_interface.f90)
25-
target_link_libraries(hdf5iface_32
26-
${HDF5_Fortran_LIBRARIES} ${HDF5_Fortran_HL_LIBRARIES})
27-
set_target_properties(hdf5iface_32 PROPERTIES Fortran_MODULE_DIRECTORY mod.real32)
22+
add_library(hdf5oo hdf5_interface.f90)
23+
target_link_libraries(hdf5oo ${HDF5_Fortran_LIBRARIES} ${HDF5_Fortran_HL_LIBRARIES})
2824

29-
add_library(hdf5iface_64 hdf5_interface.f90)
30-
target_compile_options(hdf5iface_64 PUBLIC ${F64})
31-
target_link_libraries(hdf5iface_64
32-
${HDF5_Fortran_LIBRARIES} ${HDF5_Fortran_HL_LIBRARIES})
33-
set_target_properties(hdf5iface_64 PROPERTIES Fortran_MODULE_DIRECTORY mod.real64)
25+
# ========== test
3426

27+
add_executable(testh5 test_hdf5_ifc.f90)
28+
target_link_libraries(testh5 hdf5oo)
29+
target_compile_options(testh5 PRIVATE -Wno-compare-reals)
3530

36-
add_executable(test_hdf5_ifc_32 test_hdf5_ifc.f90)
37-
target_link_libraries(test_hdf5_ifc_32 hdf5iface_32)
38-
target_compile_options(test_hdf5_ifc_32 PRIVATE -Wno-compare-reals)
39-
set_target_properties(test_hdf5_ifc_32 PROPERTIES Fortran_MODULE_DIRECTORY mod.real32)
40-
41-
add_executable(test_hdf5_ifc_64 test_hdf5_ifc.f90)
42-
target_link_libraries(test_hdf5_ifc_64 hdf5iface_64)
43-
target_compile_options(test_hdf5_ifc_64 PRIVATE -Wno-compare-reals)
44-
set_target_properties(test_hdf5_ifc_64 PROPERTIES Fortran_MODULE_DIRECTORY mod.real64)
4531
#---------------------------
4632
enable_testing()
47-
add_test(NAME h5iface_32 COMMAND test_hdf5_ifc_32)
48-
49-
add_test(NAME h5iface_64 COMMAND test_hdf5_ifc_64)
33+
add_test(NAME h5oo COMMAND testh5)

0 commit comments

Comments
 (0)