Commit 52706049 authored by Gregor Michalicek's avatar Gregor Michalicek

Introduce configure test for the availability of the ChASE library

...test built together with Miriam.
parent 3ae67d37
......@@ -12,6 +12,7 @@ include("cmake/tests/test_HDF5.cmake")
include("cmake/tests/test_Wannier90.cmake")
include("cmake/tests/test_Wannier4.cmake")
include("cmake/tests/test_Wannier5.cmake")
include("cmake/tests/test_ChASE.cmake")
include("cmake/tests/test_MAGMA.cmake")
include("cmake/tests/test_GPU.cmake")
include("cmake/tests/test_LibXC.cmake")
......
......@@ -24,6 +24,7 @@ message("${Green} HDF5 Library found : ${CReset} ${FLEUR_USE_HDF5}"
message("${Green} Wannier90 1.2 Library found : ${CReset} ${FLEUR_USE_WANN}")
message("${Green} Wannier90-4 Library found : ${CReset} ${FLEUR_USE_WANN4}")
message("${Green} Wannier90-5 Library found : ${CReset} ${FLEUR_USE_WANN5}")
message("${Green} ChASE Library found : ${CReset} ${FLEUR_USE_CHASE}")
message("${Green} MAGMA Library found : ${CReset} ${FLEUR_USE_MAGMA}")
message("${Green} MPI Library found : ${CReset} ${FLEUR_USE_MPI}")
if (FLEUR_USE_MPI)
......
#First check if we can compile with ChASE
try_compile(FLEUR_USE_CHASE ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/cmake/tests/test_ChASE.f90 LINK_LIBRARIES ${FLEUR_LIBRARIES})
if (NOT FLEUR_USE_CHASE)
find_package(chase)
find_package(chase-fleur)
set(TEST_LIBRARIES ${FLEUR_LIBRARIES} ${CHASE_LIBRARIES} ${CHASE-FLEUR_LIBRARIES})
try_compile(FLEUR_USE_CHASE ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/cmake/tests/test_ChASE.f90 LINK_LIBRARIES ${TEST_LIBRARIES})
if (FLEUR_USE_CHASE)
set(FLEUR_LIBRARIES ${FLEUR_LIBRARIES} ${CHASE_LIBRARIES} ${CHASE-FLEUR_LIBRARIES})
set(FLEUR_MPI_LIBRARIES ${FLEUR_MPI_LIBRARIES} ${CHASE_LIBRARIES} ${CHASE-FLEUR_LIBRARIES})
endif()
endif()
!--------------------------------------------------------------------------------
! Copyright (c) 2017 Peter Grünberg Institut, Forschungszentrum Jülich, Germany
! This file is part of FLEUR and available as free software under the conditions
! of the MIT license as expressed in the LICENSE file in more detail.
!--------------------------------------------------------------------------------
! Author: Miriam Hinzen
PROGRAM test
use iso_c_binding
interface
subroutine chase_r( h, n, v, ritzv, nev, nex, deg, tol, mode, opt ) bind( c, name = 'dchase_' )
use iso_c_binding
real(c_double) :: h(n,*), v(n,*)
integer(c_int) :: n, deg, nev, nex
real(c_double) :: ritzv(*), tol
character(len=1,kind=c_char) :: mode, opt
end subroutine chase_r
end interface
real(c_double), ALLOCATABLE :: h(:,:), v(:,:), ritzv(:)
integer(c_int) :: n, deg, nev, nex
real(c_double) :: tol
character(len=1,kind=c_char) :: mode, opt
CALL chase_r( h, n, v, ritzv, nev, nex, deg, tol, mode, opt )
END
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