diff --git a/src/Makefile b/src/Makefile
index 90738c9..ce02018 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -1,102 +1,99 @@
#
# @file Makefile
#
# @brief Makefile for futils library
#
# @copyright
# Copyright (©) 2021 EPFL (Ecole Polytechnique Fédérale de Lausanne)
# SPC (Swiss Plasma Center)
#
# futils is free software: you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as published by the Free
# Software Foundation, either version 3 of the License, or (at your option)
# any later version.
#
# futils is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this program. If not, see .
#
# @authors
# (in alphabetical order)
# @author Paolo Angelino
# @author Claudio Gheller
# @author Sébastien Jolliet
# @author Ben McMillan
# @author Nicolas Richart
# @author Trach-Minh Tran
#
PREFIX ?= $(PWD)
#PREFIX=/usr/local/crpp
F90 = mpif90
HDF5 = $(HDF5_ROOT)
#OPT = -O3 -fast -Mvect=simd -Munroll -Minline -Mipa=fast,inline -Mlarge_arrays
OPT = -O3 -fast -Mvect=simd -Munroll -Mlarge_arrays
F90FLAGS = $(OPT) -I${HDF5}/lib -I${HDF5}/include
CC = cc
CFLAGS = -O2
LDFLAGS = $(OPT) -L. -L${HDF5}/lib
#LIBS = -lfutils -lhdf5_fortran -lhdf5 -lz -lgcc_s -lcrypt -lssl
LIBS = -lfutils -lhdf5_fortran -lhdf5 -lz
.SUFFIXES:
.SUFFIXES: .o .c .f90 .F90
.f90.o:
$(F90) $(F90FLAGS) -c $<
.F90.o:
$(F90) $(F90FLAGS) -c $<
lib: libfutils.a getfile
getfile: getfile.o
$(F90) $(LDFLAGS) -o $@ $< $(LIBS)
-h5types: h5types.o
- $(F90) $(LDFLAGS) -o $@ $< -lhdf5_fortran -lhdf5 -lz
-
libfutils.a: futils.o cutils.o buffer.o
ar r $@ $?
ranlib $@
futils.o: append.tpl zappend.tpl putarr.tpl cputarr.tpl putarrnd.tpl cputarrnd.tpl getarr.tpl cgetarr.tpl getarrnd.tpl cgetarrnd.tpl
buffer.o: futils.o
test:
make -C ../examples test_s test_p
install: debug opt
debug:
#make distclean
#make "OPT = -g -traceback -CB" libfutils.a
make libfutils.a
mkdir -p $(PREFIX)/{lib,include}/g
cp -p libfutils.a $(PREFIX)/lib/g
cp -p *.mod $(PREFIX)/include/g
opt:
#make distclean
make libfutils.a
#make "OPT = -O3 -xHOST" libfutils.a
mkdir -p $(PREFIX)/{lib,include}/O
cp -p libfutils.a $(PREFIX)/lib/O
cp -p *.mod $(PREFIX)/include/O
uninstall:
rm -f $(PREFIX)/include{O,g}/futils.mod
rm -f $(PREFIX)/include{O,g}/hashtable.mod
rm -f $(PREFIX)/lib{O,g}/libfutils.a
getfile.o: libfutils.a
clean:
rm -f *.o *~ a.out fort.* *.h5*
distclean: clean
- rm -f getfile *.a *.mod TAGS h5types
+ rm -f getfile *.a *.mod TAGS
diff --git a/src/h5types.f90 b/src/h5types.f90
deleted file mode 100644
index bbcb2a7..0000000
--- a/src/h5types.f90
+++ /dev/null
@@ -1,69 +0,0 @@
-!>
-!> @file h5types.f90
-!>
-!> @brief HDF5 datatype codes
-!>
-!> @copyright
-!> Copyright (©) 2021 EPFL (Ecole Polytechnique Fédérale de Lausanne)
-!> SPC (Swiss Plasma Center)
-!>
-!> futils is free software: you can redistribute it and/or modify it under
-!> the terms of the GNU Lesser General Public License as published by the Free
-!> Software Foundation, either version 3 of the License, or (at your option)
-!> any later version.
-!>
-!> futils is distributed in the hope that it will be useful, but WITHOUT ANY
-!> WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-!> FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-!>
-!> You should have received a copy of the GNU Lesser General Public License
-!> along with this program. If not, see .
-!>
-!> @authors
-!> (in alphabetical order)
-!> @author Trach-Minh Tran
-!>
-PROGRAM main
- USE hdf5
- IMPLICIT NONE
- INTEGER :: ierr, d0=0
- INTEGER :: majnum, minnum, relnum
- CHARACTER(len=3) :: majn, minn, reln
- CHARACTER(len=64) :: libver
-!
- CALL h5open_f(ierr)
- CALL h5get_libversion_f(majnum, minnum, relnum, ierr)
- WRITE(majn,'(i3)') majnum
- WRITE(minn,'(i3)') minnum
- WRITE(reln,'(i3)') relnum
- libver = TRIM(ADJUSTL(majn))//'.'//TRIM(ADJUSTL(minn))//'.'//TRIM(ADJUSTL(reln))
- WRITE(*,'(a,1X,i0)') 'Kind of H5T_NATIVE_INTEGER', KIND(H5T_NATIVE_INTEGER)
- WRITE(*,'(a,1X,i0)') 'HID_T', HID_T
- WRITE(*,'(a,1X,i0)') 'H5T_NATIVE_INTEGER', H5T_NATIVE_INTEGER
- WRITE(*,'(a)') TRIM(libver)
-!!$ d0=H5T_NATIVE_INTEGER
- WRITE(*,'(a24,1X,i0)') 'H5T_NATIVE_INTEGER', H5T_NATIVE_INTEGER
- WRITE(*,'(a24,1X,i0)') 'H5T_NATIVE_REAL', H5T_NATIVE_REAL
- WRITE(*,'(a24,1X,i0)') 'H5T_NATIVE_DOUBLE', H5T_NATIVE_DOUBLE
- WRITE(*,'(a24,1X,i0)') 'H5T_NATIVE_CHARACTER', H5T_NATIVE_CHARACTER
- WRITE(*,'(a24,1X,i0)') 'H5T_STD_I8BE', H5T_STD_I8BE
- WRITE(*,'(a24,1X,i0)') 'H5T_STD_I8LE', H5T_STD_I8LE
- WRITE(*,'(a24,1X,i0)') 'H5T_STD_I16BE', H5T_STD_I16BE
- WRITE(*,'(a24,1X,i0)') 'H5T_STD_I16LE', H5T_STD_I16LE
- WRITE(*,'(a24,1X,i0)') 'H5T_STD_I32BE', H5T_STD_I32BE
- WRITE(*,'(a24,1X,i0)') 'H5T_STD_I32LE', H5T_STD_I32LE
- WRITE(*,'(a24,1X,i0)') 'H5T_STD_I64BE', H5T_STD_I64BE
- WRITE(*,'(a24,1X,i0)') 'H5T_STD_I64LE', H5T_STD_I64LE
- WRITE(*,'(a24,1X,i0)') 'H5T_STD_U8BE', H5T_STD_U8BE
- WRITE(*,'(a24,1X,i0)') 'H5T_STD_U8LE', H5T_STD_U8LE
- WRITE(*,'(a24,1X,i0)') 'H5T_STD_U16BE', H5T_STD_U16BE
- WRITE(*,'(a24,1X,i0)') 'H5T_STD_U16LE', H5T_STD_U16LE
- WRITE(*,'(a24,1X,i0)') 'H5T_STD_U32BE', H5T_STD_U32BE
- WRITE(*,'(a24,1X,i0)') 'H5T_STD_U32LE', H5T_STD_U32LE
- WRITE(*,'(a24,1X,i0)') 'H5T_STD_U64BE', H5T_STD_U64BE
- WRITE(*,'(a24,1X,i0)') 'H5T_STD_U64LE', H5T_STD_U64LE
- WRITE(*,'(a24,1X,i0)') 'H5T_IEEE_F32BE', H5T_IEEE_F32BE
- WRITE(*,'(a24,1X,i0)') 'H5T_IEEE_F32LE', H5T_IEEE_F32LE
- WRITE(*,'(a24,1X,i0)') 'H5T_IEEE_F64BE', H5T_IEEE_F64BE
- WRITE(*,'(a24,1X,i0)') 'H5T_IEEE_F64LE', H5T_IEEE_F64LE
-END PROGRAM main
diff --git a/src/vl.f90 b/src/vl.f90
deleted file mode 100644
index f3df85f..0000000
--- a/src/vl.f90
+++ /dev/null
@@ -1,78 +0,0 @@
-!>
-!> @file vl.f90
-!>
-!> @brief
-!>
-!> @copyright
-!> Copyright (©) 2021 EPFL (Ecole Polytechnique Fédérale de Lausanne)
-!> SPC (Swiss Plasma Center)
-!>
-!> futils is free software: you can redistribute it and/or modify it under
-!> the terms of the GNU Lesser General Public License as published by the Free
-!> Software Foundation, either version 3 of the License, or (at your option)
-!> any later version.
-!>
-!> futils is distributed in the hope that it will be useful, but WITHOUT ANY
-!> WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-!> FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-!>
-!> You should have received a copy of the GNU Lesser General Public License
-!> along with this program. If not, see .
-!>
-!> @authors
-!> (in alphabetical order)
-!> @author Trach-Minh Tran
-!>
-PROGRAM main
- USE hdf5
- IMPLICIT NONE
- CHARACTER(len=32) :: file ='vl.h5'
- INTEGER :: iarr(5,6), siz(6), i, j
- INTEGER :: ierr
- INTEGER(HID_T) :: fid, dsid, vltype, did
- INTEGER(HSIZE_T) :: dims(2) = (/5,6/)
-!===========================================================================
-!
-! Define variable lenght array
-!
- iarr = -100
- DO j=1,6
- siz(j) = j-1
- DO i=1,j-1
- iarr(i,j) = siz(j)
- END DO
- END DO
-!
- WRITE(*, '(a,10i3)') 'siz', siz
- DO i=1,5
- WRITE(*,'(10i5)') iarr(i,:)
- END DO
-!
-! HDF5 initialization
-!
- CALL h5open_f(ierr)
- CALL h5fcreate_f(file, H5F_ACC_TRUNC_F, fid, ierr)
-!
-! Create dataset
-!
- CALL h5screate_simple_f(1, (/6_HSIZE_T/), dsid, ierr)
-!
-! Create VL type
-!
- CALL h5tvlen_create_f(H5T_NATIVE_INTEGER, vltype, ierr)
-!
-! Create Dataset
-!
- CALL h5dcreate_f(fid, "VLarray", vltype, dsid, did, ierr)
-!
-! Write the dataset
-!
- CALL h5dwrite_vl_f(did, vltype, iarr, dims, siz, ierr)
-!
-! Clean up
-!
- CALL h5dclose_f(did, ierr)
- CALL h5tclose_f(vltype, ierr)
- CALL h5sclose_f(dsid, ierr)
- CALL h5fclose_f(fid, ierr)
-END PROGRAM main