Commit f8449286 authored by Daniel Wortmann's avatar Daniel Wortmann

Added CPP_HDFMPI to check if HDF is compiled with support for parallel IO

parent 11f12b0f
......@@ -4,8 +4,8 @@ set(FLEUR_MPI_DEFINITIONS "CPP_DOUBLE")
include("cmake/compilerflags.cmake")
include("cmake/tests/test_XML.cmake")
include("cmake/tests/test_LAPACK.cmake")
include("cmake/tests/test_HDF5.cmake")
include("cmake/tests/test_MPI.cmake")
include("cmake/tests/test_HDF5.cmake")
if (FLEUR_USE_MPI)
include("cmake/tests/test_SCALAPACK.cmake")
include("cmake/tests/test_ELPA.cmake")
......
......@@ -48,7 +48,7 @@ init/tetcon.f init/kvecon.f
set(inpgen_F90 io/xsf_io.f90
global/types.F90 global/enpara.f90 global/chkmt.f90 inpgen/inpgen.f90 inpgen/set_inp.f90 io/rw_inp.f90 juDFT/juDFT.F90
juDFT/stop.F90 juDFT/args.F90 juDFT/time.F90 juDFT/init.F90 juDFT/sysinfo.F90 io/w_inpXML.f90 init/julia.f90 global/utility.F90
juDFT/info.F90 juDFT/stop.F90 juDFT/args.F90 juDFT/time.F90 juDFT/init.F90 juDFT/sysinfo.F90 io/w_inpXML.f90 init/julia.f90 global/utility.F90
init/compile_descr.F90 io/xmlOutput.F90 init/brzone2.f90)
set(fleur_SRC ${fleur_F90} ${fleur_F77})
......
......@@ -46,8 +46,20 @@ try_compile(FLEUR_USE_HDF5 ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/cmake/tests/t
endif()
endif()
#check if HDF is parallel
if ( FLEUR_USE_HDF5)
try_compile(FLEUR_USE_HDF5MPI ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/cmake/tests/test_HDF5MPI.f90
LINK_LIBRARIES ${FLEUR_LIBRARIES}
)
endif()
message("HDF5 Library found:${FLEUR_USE_HDF5}")
if (FLEUR_USE_HDF5)
set(FLEUR_DEFINITIONS ${FLEUR_DEFINITIONS} "CPP_HDF")
set(FLEUR_MPI_DEFINITIONS ${FLEUR_MPI_DEFINITIONS} "CPP_HDF")
if (FLEUR_USE_HDF5MPI)
if (FLEUR_USE_MPI)
set(FLEUR_MPI_DEFINITIONS ${FLEUR_MPI_DEFINITIONS} "CPP_HDFMPI")
endif()
endif()
endif()
program test
use hdf5
integer:: error
integer(hid_t) :: access_prp
CALL h5open_f(error)
CALL h5pset_fapl_mpio_f(access_prp, 1,1,error)
CALL h5close_f(error)
end
......@@ -35,7 +35,7 @@ module m_hdf_accessprp
integer :: n,i,hdferr,ierr,info
character(len=128)::path
#ifdef CPP_MPI
#ifdef CPP_HDFMPI
INCLUDE 'mpif.h'
#endif
......@@ -60,7 +60,7 @@ module m_hdf_accessprp
n=0
readloop:DO
filename="default"
#ifdef CPP_MPI
#ifdef CPP_HDFMPI
driver="mpiio"
#else
driver="default"
......@@ -95,7 +95,7 @@ module m_hdf_accessprp
CALL h5pset_fapl_core_f(access_prp(n), mem_increment, keep,hdferr)
cycle readloop
ENDIF
#ifdef CPP_MPI
#ifdef CPP_HDFMPI
CALL MPI_BARRIER(MPI_COMM_WORLD,hdferr)
IF (index(driver,"mpiio")==1) THEN
!create info object
......
......@@ -36,7 +36,7 @@
INTEGER:: err
#ifdef CPP_DEBUG
#ifdef CPP_MPI
#ifdef CPP_HDFMPI
include "mpif.h"
integer:: irank
call MPI_COMM_RANK (MPI_COMM_WORLD,irank,err)
......@@ -62,7 +62,7 @@
INTEGER::err
#ifdef CPP_DEBUG
#ifdef CPP_MPI
#ifdef CPP_HDFMPI
include "mpif.h"
integer:: irank
character(len=20)::filename
......@@ -299,7 +299,7 @@
USE hdf5
IMPLICIT NONE
INTEGER(HID_T)::trans
#ifdef CPP_MPI
#ifdef CPP_HDFMPI
INCLUDE 'mpif.h'
INTEGER::hdferr
CALL h5pcreate_f(H5P_DATASET_XFER_F, trans, hdferr)
......@@ -318,7 +318,7 @@
USE hdf5
IMPLICIT NONE
INTEGER(HID_T),INTENT(INOUT)::trans
#ifdef CPP_MPI
#ifdef CPP_HDFMPI
INTEGER::hdferr
INCLUDE 'mpif.h'
IF (trans==H5P_DEFAULT_f) RETURN
......@@ -350,7 +350,7 @@
INTEGER (hid_t) :: itype
INTEGER :: hdferr
INTEGER (size_t) :: n,nn
#ifdef CPP_MPI
#ifdef CPP_HDFMPI
include 'mpif.h'
INTEGER :: irank,nerr
CALL MPI_COMM_rank(MPI_COMM_WORLD,irank,nerr)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment