Commit 0730def7 authored by Daniel Wortmann's avatar Daniel Wortmann

Added code for mini-app, made depencencies more explicit in many places..

parent d2f28e92
...@@ -55,14 +55,13 @@ io/calculator.f global/ss_sym.f global/soc_sym.f math/inv3.f io/rw_symfile.f ...@@ -55,14 +55,13 @@ io/calculator.f global/ss_sym.f global/soc_sym.f math/inv3.f io/rw_symfile.f
kpoints/kptgen_hybrid.f kpoints/od_kptsgen.f kpoints/bravais.f kpoints/divi.f kpoints/brzone.f kpoints/kptgen_hybrid.f kpoints/od_kptsgen.f kpoints/bravais.f kpoints/divi.f kpoints/brzone.f
kpoints/kptmop.f kpoints/kpttet.f init/bandstr1.F kpoints/ordstar.f kpoints/fulstar.f kpoints/kprep.f kpoints/kptmop.f kpoints/kpttet.f init/bandstr1.F kpoints/ordstar.f kpoints/fulstar.f kpoints/kprep.f
kpoints/tetcon.f kpoints/kvecon.f init/boxdim.f global/radsra.f global/differ.f math/inwint.f kpoints/tetcon.f kpoints/kvecon.f init/boxdim.f global/radsra.f global/differ.f math/inwint.f
math/outint.f math/grule.f math/outint.f math/grule.f )
)
set(inpgen_F90 ${inpgen_F90} global/constants.f90 io/xsf_io.f90 set(inpgen_F90 ${inpgen_F90} global/constants.f90 io/xsf_io.f90
eigen/orthoglo.F90 juDFT/usage_data.F90 math/ylm4.F90 mpi/mpi_bc_tool.F90 eigen/orthoglo.F90 math/ylm4.F90 mpi/mpi_bc_tool.F90
global/sort.f90 global/chkmt.f90 inpgen/inpgen.f90 inpgen/set_inp.f90 inpgen/inpgen_help.f90 io/rw_inp.f90 juDFT/juDFT.F90 global/find_enpara.f90 global/sort.f90 global/chkmt.f90 inpgen/inpgen.f90 inpgen/set_inp.f90 inpgen/inpgen_help.f90 io/rw_inp.f90 global/find_enpara.f90
inpgen/closure.f90 inpgen/inpgen_arguments.F90 math/intgr.F90 inpgen/closure.f90 inpgen/inpgen_arguments.F90 math/intgr.F90
juDFT/info.F90 juDFT/stop.F90 juDFT/args.F90 juDFT/time.F90 juDFT/init.F90 juDFT/sysinfo.F90 juDFT/string.f90 io/w_inpXML.f90 kpoints/julia.f90 global/utility.F90 io/w_inpXML.f90 kpoints/julia.f90 global/utility.F90
init/compile_descr.F90 kpoints/kpoints.f90 io/xmlOutput.F90 kpoints/brzone2.f90 cdn/slab_dim.f90 cdn/slabgeom.f90 dos/nstm3.f90 cdn/int_21.f90 init/compile_descr.F90 kpoints/kpoints.f90 io/xmlOutput.F90 kpoints/brzone2.f90 cdn/slab_dim.f90 cdn/slabgeom.f90 dos/nstm3.f90 cdn/int_21.f90
cdn/int_21lo.f90 cdn_mt/rhomt21.f90 cdn_mt/rhonmt21.f90 force/force_a21.F90 force/force_a21_lo.f90 force/force_a21_U.f90 force/force_a12.f90 cdn/int_21lo.f90 cdn_mt/rhomt21.f90 cdn_mt/rhonmt21.f90 force/force_a21.F90 force/force_a21_lo.f90 force/force_a21_U.f90 force/force_a12.f90
eigen/tlmplm_store.F90 xc-pot/gaunt.f90 kpoints/unfoldBandKPTS.f90) eigen/tlmplm_store.F90 xc-pot/gaunt.f90 kpoints/unfoldBandKPTS.f90)
...@@ -85,7 +84,8 @@ if (${FLEUR_USE_SERIAL}) ...@@ -85,7 +84,8 @@ if (${FLEUR_USE_SERIAL})
add_executable(inpgen ${inpgen_F77} ${inpgen_F90} ${juDFT_SRC_F90} ${c_filesInpgen}) add_executable(inpgen ${inpgen_F77} ${inpgen_F90} ${juDFT_SRC_F90} ${c_filesInpgen})
target_compile_definitions(inpgen PUBLIC ${FLEUR_DEFINITIONS}) target_compile_definitions(inpgen PUBLIC ${FLEUR_DEFINITIONS})
target_link_libraries(inpgen ${FLEUR_LIBRARIES}) target_link_libraries(inpgen ${FLEUR_LIBRARIES})
set_target_properties(inpgen PROPERTIES Fortran_MODULE_DIRECTORY inpgen_modules COMPILE_OPTIONS -Iinpgen_modules) target_link_libraries(inpgen juDFT)
set_target_properties(inpgen PROPERTIES Fortran_MODULE_DIRECTORY inpgen_modules COMPILE_OPTIONS "-IjuDFT_modules -Iinpgen_modules")
endif() endif()
#parallel executables #parallel executables
if(${FLEUR_USE_MPI}) if(${FLEUR_USE_MPI})
......
...@@ -13,31 +13,37 @@ diagonalization/available_solvers.F90 ...@@ -13,31 +13,37 @@ diagonalization/available_solvers.F90
diagonalization/writeout.F90 diagonalization/writeout.F90
diagonalization/elpa_20180525_onenode.F90) diagonalization/elpa_20180525_onenode.F90)
if (FLEUR_USE_ELPA_20180525) if (FLEUR_USE_ELPA_20180525)
set(fleur_F90 ${fleur_F90} set(fleur_F90 ${fleur_F90} diagonalization/elpa_20180525.F90)
diagonalization/elpa_20180525.F90 set(diag_test_files diagonalization/elpa_20180525.F90)
)
else() else()
set(fleur_F90 ${fleur_F90} set(fleur_F90 ${fleur_F90} diagonalization/elpa.F90)
diagonalization/elpa.F90 set(diag_test_files diagonalization/elpa.F90)
)
endif() endif()
set(diag_test_files ${diag_test_files} set(diag_test_files ${diag_test_files}
diagonalization/diag_test.F90
diagonalization/eigen_diag.F90 diagonalization/eigen_diag.F90
diagonalization/lapack_diag.F90 diagonalization/lapack_diag.F90
diagonalization/magma.F90 diagonalization/magma.F90
diagonalization/scalapack.F90 diagonalization/scalapack.F90
diagonalization/chase_diag.F90 #diagonalization/chase_diag.F90
diagonalization/symmetrize_matrix.f90 #diagonalization/symmetrize_matrix.f90
diagonalization/cusolver_diag.F90 diagonalization/cusolver_diag.F90
diagonalization/elemental.F90 diagonalization/elemental.F90
diagonalization/available_solvers.F90 diagonalization/available_solvers.F90
diagonalization/writeout.F90 diagonalization/writeout.F90
diagonalization/elpa_20180525_onenode.F90) diagonalization/elpa_20180525_onenode.F90
types/types_mat.F90
types/types_mpimat.F90
types/types_gpumat.F90
types/types_setup.F90
io/io_matrix.F90
io/iomatrix_hdf.F90
)
add_executable(diag_test ${diag_test_files}) add_executable(diag_test ${diag_test_files})
target_compile_definitions(diag_test PUBLIC ${FLEUR_DEFINITIONS}) target_compile_definitions(diag_test PUBLIC ${FLEUR_DEFINITIONS})
target_link_libraries(diag_test ${FLEUR_LIBRARIES}) target_link_libraries(diag_test ${FLEUR_LIBRARIES})
set_target_properties(diag_test PROPERTIES Fortran_MODULE_DIRECTORY diag_test_modules COMPILE_OPTIONS -Idiag_test_modules) target_link_libraries(diag_test juDFT)
set_target_properties(diag_test PROPERTIES Fortran_MODULE_DIRECTORY diag_test_modules COMPILE_OPTIONS "-IjuDFT_modules -Idiag_test_modules")
...@@ -90,7 +90,7 @@ CONTAINS ...@@ -90,7 +90,7 @@ CONTAINS
#ifdef CPP_CHASE #ifdef CPP_CHASE
SUBROUTINE init_chase(mpi,DIMENSION,input,atoms,kpts,noco,l_real) SUBROUTINE init_chase(mpi,DIMENSION,input,atoms,kpts,noco,l_real)
USE m_types_mpimat USE m_types_mpimat
USE m_types USE m_types_setup
USE m_types_mpi USE m_types_mpi
USE m_judft USE m_judft
USE m_eig66_io USE m_eig66_io
...@@ -125,8 +125,8 @@ CONTAINS ...@@ -125,8 +125,8 @@ CONTAINS
#endif #endif
SUBROUTINE chase_diag(hmat,smat,ikpt,jsp,iter,ne,eig,zmat) SUBROUTINE chase_diag(hmat,smat,ikpt,jsp,iter,ne,eig,zmat)
USE m_types_mpimat USE m_types_mpimat
USE m_types USE m_types_mat
USE m_judft USE m_judft
USE iso_c_binding USE iso_c_binding
USE m_eig66_io USE m_eig66_io
...@@ -164,7 +164,7 @@ CONTAINS ...@@ -164,7 +164,7 @@ CONTAINS
#ifdef CPP_CHASE #ifdef CPP_CHASE
SUBROUTINE chase_diag_noMPI(hmat,smat,ikpt,jsp,iter,ne,eig,zmat) SUBROUTINE chase_diag_noMPI(hmat,smat,ikpt,jsp,iter,ne,eig,zmat)
USE m_types USE m_types_mat
USE m_judft USE m_judft
USE iso_c_binding USE iso_c_binding
USE m_eig66_io USE m_eig66_io
...@@ -312,7 +312,7 @@ CONTAINS ...@@ -312,7 +312,7 @@ CONTAINS
SUBROUTINE chase_diag_MPI(hmat,smat,ikpt,jsp,iter,ne,eig,zmat) SUBROUTINE chase_diag_MPI(hmat,smat,ikpt,jsp,iter,ne,eig,zmat)
use m_types_mpimat use m_types_mpimat
USE m_types USE m_types_mat
USE m_judft USE m_judft
USE iso_c_binding USE iso_c_binding
USE m_eig66_io USE m_eig66_io
...@@ -455,6 +455,7 @@ CONTAINS ...@@ -455,6 +455,7 @@ CONTAINS
SUBROUTINE priv_init_chasempimat(hmat,mat,nev,nex) SUBROUTINE priv_init_chasempimat(hmat,mat,nev,nex)
USE m_types_mpimat USE m_types_mpimat
USE m_types_mat
IMPLICIT NONE IMPLICIT NONE
TYPE(t_mpimat),INTENT(INOUT)::hmat,mat TYPE(t_mpimat),INTENT(INOUT)::hmat,mat
INTEGER,INTENT(IN) :: nev,nex INTEGER,INTENT(IN) :: nev,nex
......
...@@ -4,7 +4,8 @@ ...@@ -4,7 +4,8 @@
! of the MIT license as expressed in the LICENSE file in more detail. ! of the MIT license as expressed in the LICENSE file in more detail.
!-------------------------------------------------------------------------------- !--------------------------------------------------------------------------------
MODULE m_cusolver_diag MODULE m_cusolver_diag
USE m_types USE m_types_mat
USE m_types_mpimat
USE m_judft USE m_judft
#ifdef CPP_GPU #ifdef CPP_GPU
USE m_types_gpumat USE m_types_gpumat
...@@ -39,7 +40,6 @@ MODULE m_cusolver_diag ...@@ -39,7 +40,6 @@ MODULE m_cusolver_diag
CONTAINS CONTAINS
SUBROUTINE cusolver_diag(hmat,smat,ne,eig,zmat) SUBROUTINE cusolver_diag(hmat,smat,ne,eig,zmat)
!Simple driver to solve Generalized Eigenvalue Problem using CuSolverDN !Simple driver to solve Generalized Eigenvalue Problem using CuSolverDN
USE m_types
IMPLICIT NONE IMPLICIT NONE
CLASS(t_mat),INTENT(INOUT) :: hmat,smat CLASS(t_mat),INTENT(INOUT) :: hmat,smat
INTEGER,INTENT(INOUT) :: ne INTEGER,INTENT(INOUT) :: ne
......
!--------------------------------------------------------------------------------
! Copyright (c) 2019 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.
!--------------------------------------------------------------------------------
PROGRAM diag_test
USE m_judft
USE m_types_mat
USE m_types_mpimat
USE m_eigen_diag
USE m_io_matrix
IMPLICIT NONE
INTEGER :: matsize,ne,mode,fid
INTEGER :: err,isize
CHARACTER(len=50) :: filename
CLASS(t_mat),ALLOCATABLE :: hmat,smat,ev
REAL,ALLOCATABLE :: eig(:)
LOGICAL :: l_exist,l_real
REAL :: t1,t2
#ifdef CPP_MPI
Include 'mpif.h'
CALL MPI_COMM_SIZE(MPI_COMM_WORLD,isize,err)
IF (isize>1) THEN
ALLOCATE(t_mpimat::hmat)
ALLOCATE(t_mpimat::smat)
hmat%blacsdata%mpi_comm=MPI_COMM_WORLD
smat%blacsdata%mpi_comm=MPI_COMM_WORLD
END IF
#endif
IF (.NOT.ALLOCATED(hmat)) THEN
ALLOCATE(t_mat::hmat)
ALLOCATE(t_mat::smat)
ENDIF
! get mode
filename=judft_string_for_argument("-mode")
READ(filename,*) mode
! get filename
filename=judft_string_for_argument("-file")
INQUIRE(file=filename,exist=l_exist)
IF (.NOT.l_exist) CALL judft_error("File specified does not exist")
!matsize is actually only needed if file is created
fid=open_matrix(l_real,matsize,2,2,filename)
CALL read_matrix(hmat,1,fid)
CALL read_matrix(smat,2,fid)
SELECT TYPE(hmat)
TYPE is (t_mpimat)
ne=0.15*hmat%global_size1
ALLOCATE(eig(hmat%global_size1))
CLASS default
ne=0.15*hmat%matsize1
ALLOCATE(eig(hmat%matsize1))
END SELECT
CALL cpu_TIME(t1)
CALL eigen_diag(mode,hmat,smat,ne,eig,ev)
CALL cpu_TIME(t2)
PRINT *,"No of eigenvalues:",ne
PRINT *,eig(:ne)
PRINT *,"Time used:",t1-t2
CALL close_matrix(fid)
END PROGRAM diag_test
...@@ -20,10 +20,10 @@ CONTAINS ...@@ -20,10 +20,10 @@ CONTAINS
USE m_elpa_onenode USE m_elpa_onenode
USE m_scalapack USE m_scalapack
USE m_elemental USE m_elemental
USE m_chase_diag ! USE m_chase_diag
USE m_types_mpimat USE m_types_mpimat
USE m_types_gpumat USE m_types_gpumat
USE m_matrix_copy ! USE m_matrix_copy
USE m_cusolver_diag USE m_cusolver_diag
USE m_judft_usage USE m_judft_usage
USE m_writeout USE m_writeout
...@@ -71,7 +71,7 @@ CONTAINS ...@@ -71,7 +71,7 @@ CONTAINS
CALL lapack_diag(hmat,smat,ne,eig,ev) CALL lapack_diag(hmat,smat,ne,eig,ev)
CASE (diag_chase) CASE (diag_chase)
IF (.NOT.(PRESENT(ikpt).AND.PRESENT(jsp).AND.PRESENT(iter))) CALL judft_error("Optional arguments must be present for chase in eigen_diag") IF (.NOT.(PRESENT(ikpt).AND.PRESENT(jsp).AND.PRESENT(iter))) CALL judft_error("Optional arguments must be present for chase in eigen_diag")
CALL chase_diag(hmat,smat,ikpt,jsp,iter,ne,eig,ev) ! CALL chase_diag(hmat,smat,ikpt,jsp,iter,ne,eig,ev)
CASE (diag_debugout) CASE (diag_debugout)
CALL diag_writeout(smat,hmat) CALL diag_writeout(smat,hmat)
CASE default CASE default
......
...@@ -26,7 +26,7 @@ CONTAINS ...@@ -26,7 +26,7 @@ CONTAINS
#include"cpp_double.h" #include"cpp_double.h"
USE m_juDFT USE m_juDFT
USE m_types_mpimat USE m_types_mpimat
USE m_types USE m_types_mat
#ifdef CPP_ELPA #ifdef CPP_ELPA
USE elpa1 USE elpa1
#ifdef CPP_ELPA2 #ifdef CPP_ELPA2
......
...@@ -25,7 +25,6 @@ CONTAINS ...@@ -25,7 +25,6 @@ CONTAINS
!---------------------------------------------------- !----------------------------------------------------
USE m_juDFT USE m_juDFT
USE m_types_mat USE m_types_mat
USE m_types
#ifdef CPP_ELPA_ONENODE #ifdef CPP_ELPA_ONENODE
USE elpa USE elpa
#endif #endif
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
! of the MIT license as expressed in the LICENSE file in more detail. ! of the MIT license as expressed in the LICENSE file in more detail.
!-------------------------------------------------------------------------------- !--------------------------------------------------------------------------------
MODULE m_lapack_diag MODULE m_lapack_diag
USE m_types USE m_types_mat
USE m_judft USE m_judft
IMPLICIT NONE IMPLICIT NONE
CONTAINS CONTAINS
......
...@@ -16,7 +16,7 @@ CONTAINS ...@@ -16,7 +16,7 @@ CONTAINS
#ifdef CPP_MAGMA #ifdef CPP_MAGMA
use magma use magma
#endif #endif
use m_types use m_types_mat
IMPLICIT NONE IMPLICIT NONE
! ... Arguments ... ! ... Arguments ...
......
...@@ -25,7 +25,7 @@ CONTAINS ...@@ -25,7 +25,7 @@ CONTAINS
#include"cpp_double.h" #include"cpp_double.h"
USE m_juDFT USE m_juDFT
USE m_types_mpimat USE m_types_mpimat
USE m_types USE m_types_mat
IMPLICIT NONE IMPLICIT NONE
CLASS(t_mat),INTENT(INOUT) :: hmat,smat CLASS(t_mat),INTENT(INOUT) :: hmat,smat
CLASS(t_mat),ALLOCATABLE,INTENT(OUT)::ev CLASS(t_mat),ALLOCATABLE,INTENT(OUT)::ev
......
...@@ -2,7 +2,7 @@ MODULE m_writeout ...@@ -2,7 +2,7 @@ MODULE m_writeout
CONTAINS CONTAINS
SUBROUTINE diag_writeout(smat,hmat) SUBROUTINE diag_writeout(smat,hmat)
USE m_types USE m_types_mat
USE m_judft USE m_judft
USE m_io_matrix USE m_io_matrix
USE m_types_mpimat USE m_types_mpimat
......
...@@ -5,7 +5,8 @@ ...@@ -5,7 +5,8 @@
!-------------------------------------------------------------------------------- !--------------------------------------------------------------------------------
MODULE m_io_matrix MODULE m_io_matrix
USE m_types USE m_types_mat
USE m_types_mpimat
USE m_judft USE m_judft
USE m_iomatrix_hdf USE m_iomatrix_hdf
#ifdef CPP_HDF #ifdef CPP_HDF
...@@ -46,7 +47,6 @@ CONTAINS ...@@ -46,7 +47,6 @@ CONTAINS
END FUNCTION OPEN_MATRIX END FUNCTION OPEN_MATRIX
SUBROUTINE read_matrix(mat,rec,id) SUBROUTINE read_matrix(mat,rec,id)
USE m_types_mpimat
CLASS(t_Mat),INTENT(INOUT) :: mat CLASS(t_Mat),INTENT(INOUT) :: mat
INTEGER,INTENT(IN) :: rec,id INTEGER,INTENT(IN) :: rec,id
...@@ -67,7 +67,6 @@ CONTAINS ...@@ -67,7 +67,6 @@ CONTAINS
END SUBROUTINE read_matrix END SUBROUTINE read_matrix
SUBROUTINE write_matrix(mat,rec,id) SUBROUTINE write_matrix(mat,rec,id)
USE m_types_mpimat
CLASS(t_Mat),INTENT(IN) :: mat CLASS(t_Mat),INTENT(IN) :: mat
INTEGER,INTENT(IN) :: rec,id INTEGER,INTENT(IN) :: rec,id
......
...@@ -2,14 +2,14 @@ MODULE m_iomatrix_hdf ...@@ -2,14 +2,14 @@ MODULE m_iomatrix_hdf
USE m_judft USE m_judft
USE hdf5 USE hdf5
USE m_hdf_tools USE m_hdf_tools
USE m_types_mat
USE m_types_mpimat
IMPLICIT NONE IMPLICIT NONE
PRIVATE PRIVATE
PUBLIC iomatrix_hdf_close,iomatrix_hdf_open,iomatrix_hdf_write,iomatrix_hdf_read PUBLIC iomatrix_hdf_close,iomatrix_hdf_open,iomatrix_hdf_write,iomatrix_hdf_read
CONTAINS CONTAINS
SUBROUTINE iomatrix_hdf_read(mat,nrec,did) SUBROUTINE iomatrix_hdf_read(mat,nrec,did)
USE m_types
USE m_types_mpimat
CLASS(t_Mat),INTENT(INOUT) :: mat CLASS(t_Mat),INTENT(INOUT) :: mat
INTEGER,INTENT(IN) :: nrec INTEGER,INTENT(IN) :: nrec
INTEGER(HID_t),INTENT(in) :: did INTEGER(HID_t),INTENT(in) :: did
...@@ -58,8 +58,6 @@ CONTAINS ...@@ -58,8 +58,6 @@ CONTAINS
END SUBROUTINE iomatrix_hdf_read END SUBROUTINE iomatrix_hdf_read
SUBROUTINE iomatrix_hdf_write(mat,rec,did) SUBROUTINE iomatrix_hdf_write(mat,rec,did)
USE m_types
USE m_types_mpimat
CLASS(t_Mat),INTENT(IN) :: mat CLASS(t_Mat),INTENT(IN) :: mat
INTEGER,INTENT(IN) :: rec INTEGER,INTENT(IN) :: rec
INTEGER(HID_t),INTENT(in)::did INTEGER(HID_t),INTENT(in)::did
......
...@@ -23,7 +23,7 @@ juDFT/string.f90 ...@@ -23,7 +23,7 @@ juDFT/string.f90
juDFT/time.F90 juDFT/time.F90
juDFT/args.F90 juDFT/args.F90
juDFT/sysinfo.F90 juDFT/sysinfo.F90
main/fleur_arguments.F90 juDFT/fleur_arguments.F90
juDFT/xmlOutput.F90 juDFT/xmlOutput.F90
) )
target_compile_definitions(juDFT PUBLIC ${FLEUR_DEFINITIONS}) target_compile_definitions(juDFT PUBLIC ${FLEUR_DEFINITIONS})
......
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