IffGit has a new shared runner for building Docker images in GitLab CI. Visit https://iffgit.fz-juelich.de/examples/ci-docker-in-docker for more details.

Commit 9ffd69d4 authored by Daniel Wortmann's avatar Daniel Wortmann
Browse files

Merge branch 'xc-pot-refactor' into 'develop'

Xc pot refactor finished (libxc GGA is missing)

See merge request fleur/fleur!3
parents 917abc43 50469b62
......@@ -14,6 +14,7 @@ include("cmake/tests/test_Wannier4.cmake")
include("cmake/tests/test_Wannier5.cmake")
include("cmake/tests/test_MAGMA.cmake")
include("cmake/tests/test_GPU.cmake")
include("cmake/tests/test_LibXC.cmake")
if (FLEUR_USE_MPI)
include("cmake/tests/test_SCALAPACK.cmake")
include("cmake/tests/test_ELPA.cmake")
......
......@@ -38,7 +38,7 @@ include(wannier/CMakeLists.txt)
include(wannier/uhu/CMakeLists.txt)
include(forcetheorem/CMakeLists.txt)
set(inpgen_F77
set(inpgen_F77 ${inpgen_F77}
inpgen/element.f inpgen/atom_input.f inpgen/crystal.f inpgen/lattice2.f inpgen/setab.f inpgen/super_check.f
inpgen/atom_sym.f inpgen/generator.f inpgen/read_record.f inpgen/soc_or_ssdw.f inpgen/symproperties.f
inpgen/bravais_symm.f inpgen/set_atom_core.f inpgen/spg_gen.f global/triang.f
......
......@@ -19,6 +19,7 @@ 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} LibXC Library found : ${CReset} ${FLEUR_USE_LIBXC}")
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}")
......
......@@ -2,6 +2,6 @@
set(CMAKE_Fortran_COMPILER mpif90)
#set(CMAKE_C_COMPILER mpiicc)
#Add include pathes
#set(FLEUR_Fortran_FLAGS "")
set(FLEUR_Fortran_FLAGS "-I/opt/include")
#Add linker stuff
set(FLEUR_LIBRARIES ${FLEUR_LIBRARIES} "-L/usr/lib;-L/usr/lib/x86_64-linux-gnu;-lxml2;-lscalapack-openmpi;-lblacsF77init-openmpi;-lblacs-openmpi;-llapack;-lblas")
set(FLEUR_LIBRARIES ${FLEUR_LIBRARIES} "-L/opt/lib;-lxcf03;-lxc;-lhdf5_fortran;-lhdf5;-ldl;-L/usr/lib;-L/usr/lib/x86_64-linux-gnu;-lxml2;-lscalapack-openmpi;-lblacsF77init-openmpi;-lblacs-openmpi;-llapack;-lblas")
#Check if we can compile with LIBXC
try_compile(FLEUR_USE_LIBXC ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/cmake/tests/test_LibXC.f90
LINK_LIBRARIES ${FLEUR_LIBRARIES}
)
message("Libxc Library found:${FLEUR_USE_LIBXC}")
if (FLEUR_USE_LIBXC)
set(FLEUR_MPI_DEFINITIONS ${FLEUR_MPI_DEFINITIONS} "CPP_LIBXC")
set(FLEUR_DEFINITIONS ${FLEUR_DEFINITIONS} "CPP_LIBXC")
endif()
PROGRAM test
USE xc_f03_lib_m
TYPE(xc_f03_func_t) :: xc_func
CALL xc_f03_func_init(xc_func, 2, XC_UNPOLARIZED)
END PROGRAM test
......@@ -42,7 +42,7 @@ CONTAINS
IMPLICIT NONE
TYPE(t_results),INTENT(INOUT):: results
TYPE(t_xcpot),INTENT(IN) :: xcpot
CLASS(t_xcpot),INTENT(IN) :: xcpot
TYPE(t_mpi),INTENT(IN) :: mpi
TYPE(t_dimension),INTENT(IN) :: DIMENSION
TYPE(t_oneD),INTENT(IN) :: oneD
......
......@@ -80,7 +80,7 @@ CONTAINS
TYPE(t_banddos) :: banddos_temp
TYPE(t_obsolete) :: obsolete_temp
TYPE(t_enpara) :: enpara_temp
TYPE(t_xcpot) :: xcpot_temp
CLASS(t_xcpot),ALLOCATABLE :: xcpot_temp
TYPE(t_results) :: results_temp
TYPE(t_kpts) :: kpts_temp
TYPE(t_hybrid) :: hybrid_temp
......
......@@ -49,7 +49,7 @@ MODULE m_add_vnonlocal
USE m_io_hybrid
IMPLICIT NONE
TYPE(t_results),INTENT(INOUT) :: results
TYPE(t_xcpot),INTENT(IN) :: xcpot
TYPE(t_xcpot_inbuild),INTENT(IN) :: xcpot
TYPE(t_dimension),INTENT(IN) :: dimension
TYPE(t_hybrid),INTENT(INOUT) :: hybrid
TYPE(t_kpts),INTENT(IN) :: kpts
......
......@@ -49,7 +49,7 @@ CONTAINS
IMPLICIT NONE
TYPE(t_xcpot),INTENT(IN) :: xcpot
TYPE(t_xcpot_inbuild),INTENT(IN) :: xcpot
TYPE(t_mpi),INTENT(IN) :: mpi
TYPE(t_hybrid),INTENT(INOUT) :: hybrid
TYPE(t_sym),INTENT(IN) :: sym
......
......@@ -74,7 +74,7 @@
IMPLICIT NONE
TYPE(t_hybdat),INTENT(IN) :: hybdat
TYPE(t_results),INTENT(IN) :: results
TYPE(t_xcpot),INTENT(IN) :: xcpot
TYPE(t_xcpot_inbuild),INTENT(IN) :: xcpot
TYPE(t_mpi),INTENT(IN) :: mpi
TYPE(t_dimension),INTENT(IN) :: dimension
TYPE(t_hybrid),INTENT(INOUT) :: hybrid
......
......@@ -59,7 +59,7 @@ MODULE m_hsfock
IMPLICIT NONE
TYPE(t_hybdat),INTENT(IN) :: hybdat
TYPE(t_results),INTENT(INOUT) :: results
TYPE(t_xcpot),INTENT(IN) :: xcpot
TYPE(t_xcpot_inbuild),INTENT(IN) :: xcpot
TYPE(t_mpi),INTENT(IN) :: mpi
TYPE(t_dimension),INTENT(IN) :: dimension
TYPE(t_hybrid),INTENT(INOUT) :: hybrid
......
......@@ -11,7 +11,7 @@ CONTAINS
USE m_eig66_io
USE m_io_hybrid
IMPLICIT NONE
TYPE(t_xcpot),INTENT(IN) :: xcpot
TYPE(t_xcpot_inbuild),INTENT(IN) :: xcpot
TYPE(t_mpi),INTENT(IN) :: mpi
TYPE(t_dimension),INTENT(IN) :: DIMENSION
TYPE(t_oneD),INTENT(IN) :: oneD
......
......@@ -44,7 +44,7 @@ CONTAINS
USE m_types
IMPLICIT NONE
TYPE(t_xcpot),INTENT(IN) :: xcpot
TYPE(t_xcpot_inbuild),INTENT(IN) :: xcpot
TYPE(t_mpi),INTENT(IN) :: mpi
TYPE(t_dimension),INTENT(IN) :: DIMENSION
TYPE(t_hybrid),INTENT(INOUT) :: hybrid
......
......@@ -14,7 +14,7 @@ CONTAINS
USE m_abcof3
USE m_types
IMPLICIT NONE
TYPE(t_xcpot),INTENT(IN) :: xcpot
TYPE(t_xcpot_inbuild),INTENT(IN) :: xcpot
TYPE(t_mpi),INTENT(IN) :: mpi
TYPE(t_dimension),INTENT(IN) :: DIMENSION
TYPE(t_oneD),INTENT(IN) :: oneD
......
......@@ -36,7 +36,7 @@ SUBROUTINE initParallelProcesses(atoms,vacuum,input,stars,sliceplot,banddos,&
TYPE(t_cell), INTENT(INOUT) :: cell
TYPE(t_banddos), INTENT(INOUT) :: banddos
TYPE(t_sliceplot),INTENT(INOUT) :: sliceplot
TYPE(t_xcpot), INTENT(INOUT) :: xcpot
CLASS(t_xcpot), INTENT(INOUT) :: xcpot
TYPE(t_noco), INTENT(INOUT) :: noco
TYPE(t_dimension),INTENT(INOUT) :: dimension
TYPE(t_enpara), INTENT(INOUT) :: enpara
......
......@@ -16,7 +16,7 @@
USE m_types
IMPLICIT NONE
TYPE(t_xcpot),INTENT(IN) :: xcpot
CLASS(t_xcpot),INTENT(IN) :: xcpot
TYPE(t_cell),INTENT(IN) :: cell
TYPE(t_sym),INTENT(IN) :: sym
TYPE(t_oneD),INTENT(INOUT):: oneD
......
......@@ -49,7 +49,7 @@
TYPE(t_noco) :: noco
TYPE(t_sliceplot) :: sliceplot
TYPE(t_banddos) :: banddos
TYPE(t_xcpot) :: xcpot
TYPE(t_xcpot_inbuild) :: xcpot
!
!
......
......@@ -38,7 +38,7 @@ CONTAINS
TYPE(t_banddos) ,INTENT(OUT) :: banddos
TYPE(t_obsolete) ,INTENT(OUT) :: obsolete
TYPE(t_enpara) ,INTENT(OUT) :: enpara
TYPE(t_xcpot) ,INTENT(OUT) :: xcpot
CLASS(t_xcpot),INTENT(OUT),ALLOCATABLE :: xcpot
TYPE(t_kpts) ,INTENT(INOUT):: kpts
TYPE(t_hybrid) ,INTENT(OUT) :: hybrid
TYPE(t_oneD) ,INTENT(OUT) :: oneD
......@@ -68,6 +68,10 @@ CONTAINS
#endif
ALLOCATE(t_forcetheo::forcetheo) !default no forcetheorem type
ALLOCATE(t_xcpot_inbuild::xcpot)
SELECT TYPE(xcpot)
TYPE IS (t_xcpot_inbuild)
namex = ' '
relcor = ' '
......@@ -180,18 +184,18 @@ CONTAINS
!
namex=xcpot%get_name()
l_krla = xcpot%krla.EQ.1
l_krla = xcpot%data%krla.EQ.1
END IF ! mpi%irank.eq.0
#ifdef CPP_MPI
CALL MPI_BCAST(namex,4,MPI_CHARACTER,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(l_krla,1,MPI_LOGICAL,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(atoms%ntype,1,MPI_INTEGER,0,mpi%mpi_comm,ierr)
CALL mpi_dist_forcetheorem(mpi,forcetheo)
#endif
IF (mpi%irank.NE.0) THEN
CALL xcpot%init(namex,l_krla)
CALL xcpot%init(namex,l_krla,atoms%ntype)
END IF
CALL setup(mpi,atoms,kpts,DIMENSION,sphhar,&
......@@ -203,7 +207,6 @@ CONTAINS
banddos%l_orb = .FALSE.
banddos%orbCompAtom = 0
ALLOCATE(xcpot%lda_atom(atoms%ntype))
ALLOCATE(noco%socscale(atoms%ntype))
xcpot%lda_atom(:) = .FALSE.
noco%socscale(:) = 1.0
......@@ -259,5 +262,6 @@ CONTAINS
END IF
END IF ! mpi%irank.eq.0
CALL timestop("preparation:stars,lattice harmonics,+etc")
END SELECT
END SUBROUTINE fleur_init_old
END MODULE m_fleur_init_old
......@@ -44,7 +44,7 @@
TYPE(t_vacuum), INTENT(INOUT) :: vacuum
TYPE(t_input), INTENT(INOUT) :: input
TYPE(t_banddos), INTENT(INOUT) :: banddos
TYPE(t_xcpot), INTENT(INOUT) :: xcpot
TYPE(t_xcpot_inbuild), INTENT(INOUT) :: xcpot
TYPE(t_sym), INTENT(INOUT) :: sym
TYPE(t_cell), INTENT(INOUT) :: cell
TYPE(t_sliceplot), INTENT(INOUT) :: sliceplot
......@@ -211,7 +211,7 @@
WRITE (6,FMT=8120) namex,relcor
8120 FORMAT (1x,'exchange-correlation: ',a4,2x,a12,1x,'correction')
CALL xcpot%init(namex,relcor.EQ.'relativistic')
CALL xcpot%init(namex,relcor.EQ.'relativistic',atoms%ntype)
!!$ xcpot%icorr = -99
!!$
!!$ ! l91: lsd(igrd=0) with dsprs=1.d-19 in pw91.
......
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