Commit 0412f761 authored by Daniel Wortmann's avatar Daniel Wortmann

Merge branch 'develop' into 'k-refactor'

# Conflicts:
#   cmake/Files_and_Targets.txt
parents 67e53cd1 a52bf983
stages:
- build
- test
- coverage
- deploy
- build-pgi
- test-pgi
- build-intel
- test-intel
build-gfortran:
image: iffregistry.fz-juelich.de/fleur/fleur:latest
stage: build
......@@ -42,9 +44,14 @@ pages:
cache:
paths:
- build
- public
script:
- cd /builds/fleur/fleur/build ; make doc
- mv docs/html/ ../public/
- mv /builds/fleur/fleur/docs/Docu_main.html ../public/index.html
environment:
name: Doxygen
url: https://fleur.iffgit.fz-juelich.de/fleur
artifacts:
paths:
- public
......@@ -111,3 +118,27 @@ test-intel:
- schedules
- web
- triggers
gfortran-coverage:
image: iffregistry.fz-juelich.de/fleur/fleur:latest
stage: coverage
cache:
paths:
- build
script:
- cd /builds/fleur/fleur; ./configure.sh -l coverage -flags --coverage GITLAB; cd build.coverage; make
- lcov --capture --initial -d CMakeFiles -o baseline.info
- ulimit -s unlimited ;export juDFT_MPI="mpirun -n 2 --allow-run-as-root ";ctest
- lcov --capture -d CMakeFiles -o after.info
- lcov --add-tracefile baseline.info --add-tracefile after.info -o combined.info
- genhtml combined.info --output-directory html_out
- mkdir ../public;mv html_out ../public/coverage_html
artifacts:
paths:
- public
environment:
name: Coverage
url: https://fleur.iffgit.fz-juelich.de/fleur/coverage_html
only:
- web
- schedules
\ No newline at end of file
......@@ -103,4 +103,9 @@ module purge
ml Architecture/KNL
module load intel-para CMake HDF5 libxml2/.2.9.7 ELPA/2017.11.001-hybrid
/work/ias-1/s.rost/fleur_booster/fleur/build/fleur
```
\ No newline at end of file
```
## Developing Fleur
We agreed to use a unified indentation-width of 3.
Hint: [vim](http://vim.wikia.com/wiki/Converting_tabs_to_spaces) [emacs](https://www.gnu.org/software/emacs/manual/html_node/efaq/Changing-the-length-of-a-Tab.html)
\ No newline at end of file
MODULE m_cdntot
MODULE m_cdntot
! ********************************************************
! calculate the total charge density in the interstial.,
! vacuum, and mt regions c.l.fu
! ********************************************************
CONTAINS
SUBROUTINE cdntot(stars,atoms,sym,vacuum,input,cell,oneD,&
den,l_printData,qtot,qistot)
CONTAINS
SUBROUTINE cdntot(stars,atoms,sym,vacuum,input,cell,oneD,&
den,l_printData,qtot,qistot)
USE m_intgr, ONLY : intgr3
USE m_constants
......@@ -55,19 +55,19 @@
q = 0.e0
! -----mt charge
CALL timestart("MT")
DO 10 n = 1,atoms%ntype
DO n = 1,atoms%ntype
CALL intgr3(den%mt(:,0,n,jspin),atoms%rmsh(:,n),atoms%dx(n),atoms%jri(n),w)
qmt(n) = w*sfp_const
q = q + atoms%neq(n)*qmt(n)
10 CONTINUE
ENDDO
CALL timestop("MT")
! -----vacuum region
IF (input%film) THEN
DO 20 ivac = 1,vacuum%nvac
DO ivac = 1,vacuum%nvac
DO nz = 1,vacuum%nmz
IF (oneD%odi%d1) THEN
rht1(nz,ivac,jspin) = (cell%z1+(nz-1)*vacuum%delz)*&
& den%vacz(nz,ivac,jspin)
den%vacz(nz,ivac,jspin)
ELSE
rht1(nz,ivac,jspin) = den%vacz(nz,ivac,jspin)
END IF
......@@ -79,30 +79,19 @@
ELSE
q = q + cell%area*q2(1)
END IF
20 CONTINUE
ENDDO
END IF
! -----is region
IF (.not.judft_was_Argument("-oldfix")) THEN
CALL convol(stars,x,den%pw(:,jspin),stars%ufft)
qis = x(1)*cell%omtil
ELSE
qis = 0.
! DO 30 j = 1,nq3
! CALL pwint(
! > k1d,k2d,k3d,n3d,ntypd,natd,nop,invtab,odi,
! > ntype,neq,volmts,taual,z1,vol,volint,
! > symor,tau,mrot,rmt,sk3,bmat,ig2,ig,
! > kv3(1,j),
! < x)
! qis = qis + den%pw(j,jspin)*x*nstr(j)
! 30 CONTINUE
CALL pwint_all(&
& stars,atoms,sym,oneD,&
& cell,&
& x)
DO j = 1,stars%ng3
qis = qis + den%pw(j,jspin)*x(j)*stars%nstr(j)
ENDDO
qis = 0.
CALL pwint_all(stars,atoms,sym,oneD,cell,x)
DO j = 1,stars%ng3
qis = qis + den%pw(j,jspin)*x(j)*stars%nstr(j)
ENDDO
endif
qistot = qistot + qis
q = q + qis
......@@ -137,12 +126,12 @@
IF(l_printData) THEN
CALL writeXMLElementFormPoly('totalCharge',(/'value'/),(/qtot/),reshape((/5,20/),(/1,2/)))
END IF
8000 FORMAT (/,10x,'total charge for spin',i3,'=',f12.6,/,10x,&
& 'interst. charge = ',f12.6,/,&
& (10x,'mt charge= ',4f12.6,/))
8010 FORMAT (10x,'vacuum ',i2,' charge= ',f12.6)
8020 FORMAT (/,10x,'total charge =',f12.6)
8000 FORMAT (/,10x,'total charge for spin',i3,'=',f12.6,/,10x,&
'interst. charge = ',f12.6,/,&
(10x,'mt charge= ',4f12.6,/))
8010 FORMAT (10x,'vacuum ',i2,' charge= ',f12.6)
8020 FORMAT (/,10x,'total charge =',f12.6)
CALL timestop("cdntot")
END SUBROUTINE cdntot
END MODULE m_cdntot
END SUBROUTINE cdntot
END MODULE m_cdntot
......@@ -9,7 +9,9 @@ CONTAINS
!***********************************************************************
!
SUBROUTINE q_mt_sl(jsp,atoms,nobd,ikpt,ne,skip_t,noccbd,eigVecCoeffs,usdus,slab)
USE m_types
USE m_types_setup
USE m_types_usdus
USE m_types_cdnval, ONLY: t_eigVecCoeffs, t_slab
IMPLICIT NONE
TYPE(t_usdus),INTENT(IN) :: usdus
TYPE(t_atoms),INTENT(IN) :: atoms
......
......@@ -7,8 +7,11 @@ MODULE m_qal21
CONTAINS
SUBROUTINE qal_21(dimension,atoms,input,noccbd,noco,eigVecCoeffs,denCoeffsOffdiag,ikpt,dos)
USE m_types_setup
USE m_types_dos
USE m_types_cdnval, ONLY: t_eigVecCoeffs
USE m_types_denCoeffsOffdiag
USE m_rotdenmat
USE m_types
IMPLICIT NONE
TYPE(t_dimension), INTENT(IN) :: dimension
TYPE(t_input), INTENT(IN) :: input
......
......@@ -11,7 +11,8 @@ CONTAINS
SUBROUTINE calcDenCoeffs(atoms,sphhar,sym,we,noccbd,eigVecCoeffs,ispin,denCoeffs)
USE m_juDFT
USE m_types
USE m_types_setup
USE m_types_cdnval, ONLY: t_eigVecCoeffs,t_denCoeffs
USE m_rhomt
USE m_rhonmt
USE m_rhomtlo
......
......@@ -47,7 +47,7 @@ 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
inpgen/closure.f inpgen/lapw_input.f inpgen/struct_input.f inpgen/write_struct.f
inpgen/lapw_input.f inpgen/struct_input.f inpgen/write_struct.f
io/calculator.f global/ss_sym.f global/soc_sym.f math/inv3.f io/rw_symfile.f
global/sort.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
......@@ -57,7 +57,7 @@ kpoints/tetcon.f kpoints/kvecon.f init/boxdim.f math/ylm4.f global/radsra.f math
set(inpgen_F90 ${inpgen_F90} global/constants.f90 io/xsf_io.f90
eigen/vec_for_lo.f90 eigen/orthoglo.F90 juDFT/usage_data.F90
global/enpara.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/enpara.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 inpgen/closure.f90
juDFT/info.F90 juDFT/stop.F90 juDFT/args.F90 juDFT/time.F90 juDFT/init.F90 juDFT/sysinfo.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
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
......
......@@ -4,6 +4,8 @@ if (${CMAKE_Fortran_COMPILER_ID} MATCHES "Intel")
if (${CMAKE_Fortran_COMPILER_VERSION} VERSION_LESS "13.0.0.0")
set(FLEUR_WARN_MESSAGE "You are using an old version of the Intel Fortran Compiler. Most likely FLEUR will not be build sucessfully. Consider to upgrade your compiler.")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -mkl -r8 -openmp -assume byterecl")
set(FLEUR_MPI_DEFINITIONS ${FLEUR_MPI_DEFINITIONS} "CPP_OLDINTEL")
set(FLEUR_DEFINITIONS ${FLEUR_DEFINITIONS} "CPP_OLDINTEL")
elseif (${CMAKE_Fortran_COMPILER_VERSION} VERSION_LESS "14.1.0.0")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -mkl -r8 -openmp -assume byterecl")
else()
......@@ -15,7 +17,7 @@ elseif(${CMAKE_Fortran_COMPILER_ID} MATCHES "PGI")
message("PGI Fortran detected")
set(CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS "") #fix problem in cmake
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -mp -Mr8 -Mr8intrinsics -Mcuda:kepler+ -ta:tesla:cuda7.5 -DUSE_STREAMS -DNUM_STREAMS=${N_STREAMS} -Minfo=accel -acc")
set(CMAKE_Fortran_FLAGS_RELEASE "${CMAKE_Fortran_FLAGS_RELEASE} -fast -O3")
set(CMAKE_Fortran_FLAGS_RELEASE "${CMAKE_Fortran_FLAGS_RELEASE} -O1") #"-fast -O3": problems with OpenMP, pgf90/18.4
set(CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG} -C -traceback -O0 -g -Mchkstk -Mchkptr")
elseif(${CMAKE_Fortran_COMPILER_ID} MATCHES "XL")
message("IBM/BG Fortran detected")
......
#Configuration for CLAIX@RWTH; do a 'module load intelmpi' before
if module list 2>&1 | grep -q intel
then
if ! module list 2>&1| grep -q intelmpi
then
echo "Please use intelmpi, e.g. do a module switch openmpi intelmpi"
exit
fi
export FC=$MPIFC
export CC=$MPICC
#ELPA
......@@ -16,5 +16,7 @@
FLEUR_LIBDIR="$FLEUR_LIBDIR $ELPA_LIB"
FLEUR_INCLUDEDIR="$FLEUR_INCLUDEDIR $ELPA_MODULES"
fi
elif module list 2>&1 | grep -q pgi
then
echo "found PGI compiler"
fi
......@@ -54,7 +54,7 @@ then
fi
if [ "$CLI_FLAGS" ]
then
cmake_flags="$CMAKE_Fortran_FLAGS $cmake_flags"
cmake_flags="$CLI_FLAGS $cmake_flags"
fi
for lib in $FLEUR_INCLUDEDIR $CLI_INCLUDEDIR
do
......
......@@ -70,13 +70,25 @@ IMPLICIT NONE
PRIVATE
INTEGER :: chase_eig_id
INTEGER :: chase_eig_id
PUBLIC init_chase, chase_diag
#endif
REAL :: scale_distance
REAL :: tol
PUBLIC chase_distance
CONTAINS
CONTAINS
SUBROUTINE chase_distance(dist)
IMPLICIT NONE
REAL,INTENT(in)::dist
tol=MAX(1E-8,dist*scale_distance)
END SUBROUTINE chase_distance
SUBROUTINE init_chase(mpi,dimension,atoms,kpts,noco,l_real)
#ifdef CPP_CHASE
SUBROUTINE init_chase(mpi,DIMENSION,atoms,kpts,noco,l_real)
USE m_types_mpimat
USE m_types
USE m_types_mpi
......@@ -90,11 +102,18 @@ IMPLICIT NONE
TYPE(t_atoms), INTENT(IN) :: atoms
TYPE(t_kpts), INTENT(IN) :: kpts
TYPE(t_noco), INTENT(IN) :: noco
LOGICAL, INTENT(IN) :: l_real
INTEGER :: nevd, nexd
CHARACTER(len=1000)::arg
scale_distance=1E-3
IF (judft_was_argument("-chase_scale")) THEN
arg=juDFT_string_for_argument("-chase_scale")
READ(arg,*) scale_distance
ENDIF
IF (juDFT_was_argument("-diag:chase")) THEN
nevd = min(dimension%neigd,dimension%nvd+atoms%nlotot)
nexd = min(max(nevd/4, 45),dimension%nvd+atoms%nlotot-nevd) !dimensioning for workspace
......@@ -204,10 +223,10 @@ IMPLICIT NONE
end do
end do
if(iter.EQ.1) then
call chase_r(hmat%data_r, hmat%matsize1, zMatTemp%data_r, eigenvalues, nev, nex, 25, 1e-6, 'R', 'S' )
CALL chase_r(hmat%data_r, hmat%matsize1, zMatTemp%data_r, eigenvalues, nev, nex, 25, scale_distance, 'R', 'S' )
else
CALL read_eig(chase_eig_id,ikpt,jsp,neig=nbands,eig=eigenvalues,zmat=zMatTemp)
call chase_r(hmat%data_r, hmat%matsize1, zMatTemp%data_r, eigenvalues, nev, nex, 25, 1e-6, 'A', 'S' )
CALL chase_r(hmat%data_r, hmat%matsize1, zMatTemp%data_r, eigenvalues, nev, nex, 25, tol, 'A', 'S' )
end if
ne = nev
......@@ -259,10 +278,10 @@ IMPLICIT NONE
end do
if(iter.EQ.1) then
call chase_c(hmat%data_c, hmat%matsize1, zMatTemp%data_c, eigenvalues, nev, nex, 25, 1e-6, 'R', 'S' )
CALL chase_c(hmat%data_c, hmat%matsize1, zMatTemp%data_c, eigenvalues, nev, nex, 25, scale_distance, 'R', 'S' )
else
CALL read_eig(chase_eig_id,ikpt,jsp,neig=nbands,eig=eigenvalues,zmat=zMatTemp)
call chase_c(hmat%data_c, hmat%matsize1, zMatTemp%data_c, eigenvalues, nev, nex, 25, 1e-6, 'A', 'S' )
call chase_c(hmat%data_c, hmat%matsize1, zMatTemp%data_c, eigenvalues, nev, nex, 25, tol, 'A', 'S' )
end if
ne = nev
......@@ -298,7 +317,7 @@ IMPLICIT NONE
!Simple driver to solve Generalized Eigenvalue Problem using the ChASE library
IMPLICIT NONE
TYPE(t_mpimat), INTENT(INOUT) :: hmat,smat
TYPE(t_mpimat), INTENT(INOUT) :: hmat,smat
INTEGER, INTENT(IN) :: ikpt
INTEGER, INTENT(IN) :: jsp
INTEGER, INTENT(IN) :: iter
......@@ -310,11 +329,14 @@ IMPLICIT NONE
INTEGER :: info,myid,np
REAL :: scale !scaling of eigenvalues from scalapack
CLASS(t_mat), ALLOCATABLE :: zMatTemp
TYPE(t_mat) :: zMatTemp
TYPE(t_mpimat) :: chase_mat
REAL, ALLOCATABLE :: eigenvalues(:)
REAL :: t1,t2,t3,t4
include 'mpif.h'
CALL CPU_TIME(t1)
CALL MPI_COMM_RANK(hmat%mpi_com,myid,info)
CALL MPI_COMM_SIZE(hmat%mpi_com,np,info)
smat%blacs_desc=hmat%blacs_desc
......@@ -356,51 +378,52 @@ IMPLICIT NONE
CALL chase_mat%generate_full_matrix()
ALLOCATE(eigenvalues(nev+nex))
eigenvalues = 0.0
ALLOCATE(t_mpimat::zmatTemp)
!ALLOCATE(t_mpimat::zmatTemp)
CALL zMatTemp%init(hmat%l_real,hmat%global_size1,nev+nex,MPI_COMM_SELF,.TRUE.) !Generate a pseudo-distributed matrix
IF (hmat%l_real) THEN
IF(iter.EQ.1) THEN
CALL mpi_chase_r(chase_mat%data_r, zMatTemp%data_r, eigenvalues, 25, 1e-10, 'R', 'S' )
CALL CPU_TIME(t2)
CALL mpi_chase_r(chase_mat%data_r, zMatTemp%data_r, eigenvalues, 25, 1E-4, 'R', 'S' )
CALL CPU_TIME(t3)
ELSE
CALL read_eig(chase_eig_id,ikpt,jsp,neig=nbands,eig=eigenvalues,zmat=zMatTemp)
CALL mpi_chase_r(chase_mat%data_r, zMatTemp%data_r, eigenvalues, 25, 1e-10, 'A', 'S' )
CALL CPU_TIME(t2)
CALL mpi_chase_r(chase_mat%data_r, zMatTemp%data_r, eigenvalues, 25, tol, 'A', 'S' )
CALL CPU_TIME(t3)
END IF
ELSE
IF(iter.EQ.1) THEN
CALL mpi_chase_c(chase_mat%data_c, zMatTemp%data_c, eigenvalues, 25, 1e-10, 'R', 'S' )
CALL CPU_TIME(t2)
CALL mpi_chase_c(chase_mat%data_c, zMatTemp%data_c, eigenvalues, 25, 1E-4, 'R', 'S' )
CALL CPU_TIME(t3)
ELSE
CALL read_eig(chase_eig_id,ikpt,jsp,neig=nbands,eig=eigenvalues,zmat=zMatTemp)
CALL mpi_chase_c(chase_mat%data_c, zMatTemp%data_c, eigenvalues, 25, 1e-10, 'A', 'S' )
CALL CPU_TIME(t2)
CALL mpi_chase_c(chase_mat%data_c, zMatTemp%data_c, eigenvalues, 25, tol, 'A', 'S' )
CALL CPU_TIME(t3)
END IF
ENDIF
ne = nev
IF (myid==0) CALL write_eig(chase_eig_id,ikpt,jsp,nev+nex,nev+nex,&
eigenvalues(:(nev+nex)),zmat=zMatTemp)
!Back-Transform
CALL hmat%from_non_dist(zmattemp)
call zmatTemp%free()
! --> recover the generalized eigenvectors z by solving z' = l^t * z
IF (smat%l_real) THEN
CALL PDTRTRI('U','N',smat%global_size1,smat%data_r,1,1,smat%blacs_desc,info)
CALL PDGEMM('N','N',smat%global_size1,smat%global_size1,smat%global_size1,1.0,smat%data_r,1,1,smat%blacs_desc,zmatTemp%data_r,1,1,zmattemp%blacs_desc,0.0,hmat%data_r,1,1,hmat%blacs_desc)
CALL pdtrtrs('U','N','N',hmat%global_size1,hmat%global_size1,smat%data_r,1,1,smat%blacs_desc,&
hmat%data_r,1,1,smat%blacs_desc,info)
ELSE
STOP 'chase no complex'
CALL pztrtrs('U','N','N',hmat%global_size1,hmat%global_size1,smat%data_c,1,1,smat%blacs_desc,&
hmat%data_c,1,1,smat%blacs_desc,info)
END IF
IF (info.NE.0) THEN
WRITE (6,*) 'Error in p?trtrs: info =',info
CALL juDFT_error("Diagonalization failed",calledby="chase_diag")
ENDIF
!!$ CALL hmat%copy(zmatTemp,1,1) !Copy matrix into distributed form
!!$ call zmatTemp%free()
!!$
!!$ ! --> recover the generalized eigenvectors z by solving z' = l^t * z
!!$ IF (smat%l_real) THEN
!!$ CALL pdtrtrs('U','N','N',hmat%global_size1,hmat%global_size1,smat%data_r,1,1,smat%blacs_desc,&
!!$ hmat%data_r,1,1,smat%blacs_desc,info)
!!$ ELSE
!!$ CALL pztrtrs('U','N','N',hmat%global_size1,hmat%global_size1,smat%data_c,1,1,smat%blacs_desc,&
!!$ hmat%data_c,1,1,smat%blacs_desc,info)
!!$ END IF
!!$ IF (info.NE.0) THEN
!!$ WRITE (6,*) 'Error in p?trtrs: info =',info
!!$ CALL juDFT_error("Diagonalization failed",calledby="chase_diag")
!!$ ENDIF
! Redistribute eigvec from ScaLAPACK distribution to each process
! having all eigenvectors corresponding to his eigenvalues as above
......@@ -415,6 +438,16 @@ IMPLICIT NONE
ne=ne+1
eig(ne)=eigenvalues(i)
ENDDO
CALL CPU_TIME(t4)
IF (myid==0) THEN
PRINT *,"Chase Prep:",t2-t1
PRINT *,"Chase Call:",t3-t2
PRINT *,"Chase Post:",t4-t3
PRINT *,"Chase Total:",t4-t1
ENDIF
END SUBROUTINE chase_diag_MPI
SUBROUTINE priv_init_chasempimat(hmat,mat,nev,nex)
......
<!DOCTYPE HTML>
<html>
<head> <title> FLEUR DOKU PAGE </title> </head>
<body>
<h1>Documentation for FLEUR<o:p></o:p></h1>
<ul>
<li>The <a href="http://www.flapw.de/">FLEUR wiki</a> with information on how to use FLEUR.</li>
<li>The <a href="https://fleur.iffgit.fz-juelich.de/fleur/html/">documentation of the source code</a> and information useful for developers.</li>
<li>The <a href="https://fleur.iffgit.fz-juelich.de/fleur/coverage_html">coverage analysis</a> of the source code showing which part of the code are covered by the standard tests.</li>
</ul>
</body>
</html>
......@@ -6,7 +6,7 @@
module m_corespec
USE m_types
USE m_types_setup, ONLY: t_coreSpecInput
implicit none
......
......@@ -6,9 +6,11 @@
MODULE m_corespec_eval
USE m_corespec
USE m_types
USE m_types_setup
USE m_types_usdus
USE m_types_cdnval, ONLY: t_eigVecCoeffs
USE m_constants
USE m_corespec
IMPLICIT NONE
......
......@@ -239,7 +239,7 @@ CONTAINS
IF( input%jspins .EQ. 1 .AND. hybrid%l_hybrid ) THEN
results%te_hfex%valence = 2*results%te_hfex%valence
results%te_hfex%core = 2*results%te_hfex%core
IF(hybrid%l_calhf) results%te_hfex%core = 2*results%te_hfex%core
END IF
enpara%epara_min = MINVAL(enpara%el0)
enpara%epara_min = MIN(MINVAL(enpara%ello0),enpara%epara_min)
......
......@@ -14,10 +14,12 @@ CONTAINS
!
!*********************************************************************
USE m_constants, ONLY : c_light
USE m_types_setup
USE m_types_mpi
USE m_types_enpara
USE m_xmlOutput
USE m_radsra
USE m_differ
USE m_types
USE m_xmlOutput
IMPLICIT NONE
TYPE(t_mpi),INTENT(IN) :: mpi
TYPE(t_enpara),INTENT(IN) :: enpara
......
......@@ -23,10 +23,10 @@ CONTAINS
SUBROUTINE eigenso(eig_id,mpi,DIMENSION,stars,vacuum,atoms,sphhar,&
obsolete,sym,cell,noco,input,kpts,oneD,vTot,enpara,results)
USE m_types
USE m_eig66_io, ONLY : read_eig,write_eig
USE m_spnorb
USE m_alineso
USE m_types
USE m_judft
#ifdef CPP_MPI
USE m_mpi_bc_pot
......
......@@ -5,9 +5,6 @@ CONTAINS
SUBROUTINE ssomat(seigvso,theta,phi,eig_id,DIMENSION,atoms,kpts,sym,&
cell,noco, input,mpi, oneD,enpara,v,results )
USE m_eig66_io
USE m_spnorb
USE m_abcof
USE m_types_mat
USE m_types_setup
USE m_types_mpi
......@@ -19,6 +16,9 @@ CONTAINS
USE m_types_usdus
USE m_types_lapw
USE m_constants
USE m_eig66_io
USE m_spnorb
USE m_abcof
IMPLICIT NONE
TYPE(t_mpi),INTENT(IN) :: mpi
......
......@@ -127,10 +127,6 @@ void chase_solve(T* H, T* V, Base<T>* ritzv, int* deg, double* tol, char* mode,
auto nev = config.GetNev();
auto nex = config.GetNex();
if (!config.UseApprox())
for (std::size_t k = 0; k < N * (nev + nex); ++k)
V[k] = getRandomT<T>([&]() { return d(gen); });
for (std::size_t k = 0; k < xlen * ylen; ++k) H_[k] = H[k];
config.SetTol(*tol);
......@@ -138,6 +134,12 @@ void chase_solve(T* H, T* V, Base<T>* ritzv, int* deg, double* tol, char* mode,
config.SetOpt(*opt == 'S');
config.SetApprox(*mode == 'A');
if (!config.UseApprox()){
std::cerr << "random vectors" << std::endl;
for (std::size_t k = 0; k < N * (nev + nex); ++k)
V[k] = getRandomT<T>([&]() { return d(gen); });
}
chase::Solve(&single);
}
......
......@@ -2,7 +2,13 @@ hdf5_version=1.10.2
if [ ! -r CMake-hdf5-${hdf5_version} ]