Commit 354a0318 authored by Daniel Wortmann's avatar Daniel Wortmann

Added testing for FFT in MKL

parent 3438f9bc
......@@ -7,6 +7,7 @@ include("cmake/compilerflags.cmake")
include("cmake/tests/test_XML.cmake")
include("cmake/tests/test_LAPACK.cmake")
include("cmake/tests/test_MPI.cmake")
include("cmake/tests/test_FFTMKL.cmake")
include("cmake/tests/test_HDF5.cmake")
include("cmake/tests/test_MAGMA.cmake")
include("cmake/tests/test_GPU.cmake")
......
......@@ -18,6 +18,7 @@ message("\n${Red}These Libraries are required:${CReset}")
message("${Green} XML Library found :${CReset} ${FLEUR_USE_XML}")
message("${Green} LAPACK Library found:${CReset} ${FLEUR_USE_LAPACK}")
message("${Red}These Libraries are optional:${CReset}")
message("${Green} FFT from MKL found :${CReset} ${FLEUR_USE_FFTMKL}")
message("${Green} HDF5 Library found :${CReset} ${FLEUR_USE_HDF5}")
message("${Green} MAGMA Library found:${CReset} ${FLEUR_USE_MAGMA}")
message("${Green} MPI Library found :${CReset} ${FLEUR_USE_MPI}")
......
#First check if we can compile with FFT from MKL
try_compile(FLEUR_USE_FFTMKL ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/cmake/tests/test_FFTMKL.f90
LINK_LIBRARIES ${FLEUR_LIBRARIES}
)
message("FFT from MKL found:${FLEUR_USE_FFTMKL}")
if (FLEUR_USE_FFTMKL)
set(FLEUR_MPI_DEFINITIONS ${FLEUR_MPI_DEFINITIONS} "CPP_FFT_MKL")
set(FLEUR_DEFINITIONS ${FLEUR_DEFINITIONS} "CPP_FFT_MKL")
endif()
MODULE MKL_DFT_TYPE
TYPE, PUBLIC :: DFTI_DESCRIPTOR
PRIVATE
INTEGER :: dontuse
! Structure of this type is not used in Fortran code
! the pointer to this type is used only
END TYPE DFTI_DESCRIPTOR
END MODULE MKL_DFT_TYPE
MODULE MKL_TEST
INTERFACE DftiCommitDescriptor
FUNCTION dfti_commit_descriptor_external(desc)
USE MKL_DFT_TYPE
!DEC$ ATTRIBUTES C :: dfti_commit_descriptor_external
!DEC$ ATTRIBUTES REFERENCE :: dfti_commit_descriptor_external
INTEGER dfti_commit_descriptor_external
TYPE(DFTI_DESCRIPTOR), POINTER :: desc
END FUNCTION dfti_commit_descriptor_external
END INTERFACE
END MODULE
program test
use MKL_DFT_TYPE
use MKL_test
type(dfti_descriptor),pointer :: dfti_handle
integer :: dfti_status
dfti_status = DftiCommitDescriptor(dfti_handle)
end program test
......@@ -28,3 +28,6 @@ math/differentiate.f90
math/fft2d.F90
math/fft3d.f90
)
if (FLEUR_USE_FFTMKL)
set(fleur_F90 ${fleur_F90} math/mkl_dfti.f90)
endif()
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