Commit 56bb3fb8 authored by Daniel Wortmann's avatar Daniel Wortmann

Merge branch 'develop' of ssh://fleur-git/fleur into develop

parents e8794b08 21904ba4
#First check if we can compile with ELPA
#First check if we can compile with MAGMA
if ($ENV{FLEUR_USE_MAGMA})
message("Set FLEUR_USE_MAGMA to environment, skipping test")
set(FLEUR_USE_MAGMA $ENV{FLEUR_USE_MAGMA})
else()
try_compile(FLEUR_USE_MAGMA ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/cmake/tests/test_MAGMA.f90
LINK_LIBRARIES ${FLEUR_LIBRARIES}
)
endif()
message("MAGMA Library found:${FLEUR_USE_MAGMA}")
if (FLEUR_USE_MAGMA)
......
......@@ -76,7 +76,7 @@ CONTAINS
allocate(work(1),rwork(1),iwork(1))
print *,"Magma workspace query"
call flush()
call magmaf_zhegvdx_2stage_m(NGPU_CONST,1,MagmaVec,MagmaRangeI,MagmaLower,nsize,largea_c,nsize,largeb_c,nsize,&
call magmaf_zhegvdx(1,'v','i','l',nsize,largea_c,nsize,largeb_c,nsize,&
0.0,0.0,1,ne,mout,eigTemp,work,-1,rwork,-1,iwork,-1,err)
lwork=work(1)
lrwork=rwork(1)
......@@ -88,7 +88,7 @@ CONTAINS
!Now the diagonalization
print *,"Magma diagonalization"
print *,nsize,shape(largea_c),shape(eigTemp),ne
call magmaf_zhegvdx_2stage_m(NGPU_CONST,1,MagmaVec,MagmaRangeI,MagmaLower,nsize,largea_c,nsize,largeb_c,nsize,&
call magmaf_zhegvdx(1,'v','i','l',nsize,largea_c,nsize,largeb_c,nsize,&
0.0,0.0,1,ne,mout,eigTemp,work,lwork,rwork,lrwork,iwork,liwork,err)
print*,"MAGMA info:",err
if (err/=0) call juDFT_error("Magma failed to diagonalize Hamiltonian")
......
......@@ -78,7 +78,7 @@ CONTAINS
call nvtxStartRange("hsmt_nonsph",1)
!call nvtxStartRange("hsmt_nonsph",1)
lnonsphd=MAXVAL(atoms%lnonsph)*(MAXVAL(atoms%lnonsph)+2)
ALLOCATE(dtd(0:lnonsphd,0:lnonsphd),utd(0:lnonsphd,0:lnonsphd),dtu(0:lnonsphd,0:lnonsphd),utu(0:lnonsphd,0:lnonsphd))
......
......@@ -145,11 +145,7 @@ CONTAINS
n_stride=1
#endif
ALLOCATE ( ch(dimension%nspd,dimension%jspd),chdr(dimension%nspd,dimension%jspd),chdt(dimension%nspd,dimension%jspd),&
& chdf(dimension%nspd,dimension%jspd),chdrr(dimension%nspd,dimension%jspd),chdtt(dimension%nspd,dimension%jspd),&
& chdff(dimension%nspd,dimension%jspd),chdtf(dimension%nspd,dimension%jspd),chdrt(dimension%nspd,dimension%jspd),&
& chdrf(dimension%nspd,dimension%jspd),chlh(atoms%jmtd,0:sphhar%nlhd,dimension%jspd),&
ALLOCATE ( chlh(atoms%jmtd,0:sphhar%nlhd,dimension%jspd),&
& chlhdr(atoms%jmtd,0:sphhar%nlhd,dimension%jspd),chlhdrr(atoms%jmtd,0:sphhar%nlhd,dimension%jspd))
DO 200 n = n_start,atoms%ntype,n_stride
......@@ -187,7 +183,7 @@ CONTAINS
!
!--> loop over radial mesh
!
!$OMP PARALLEL DO DEFAULT(none) &
!$OMP PARALLEL DEFAULT(none) &
#ifdef CPP_MPI
!$OMP& SHARED(vr_local,vxr_local,excr_local,ichsmrg_local,rhmn_local, rhmn_reduced) &
#endif
......@@ -202,6 +198,11 @@ CONTAINS
!$OMP& PRIVATE(vx,vxc,exc) &
!$OMP& PRIVATE(agr,agru,agrd,g2r,g2ru,g2rd,gggr,gggru,gggrd,grgru,grgrd,gzgr) &
!$OMP& PRIVATE(ch,chdr,chdt,chdf,chdrr,chdtt,chdff,chdtf,chdrt,chdrf)
ALLOCATE ( ch(dimension%nspd,dimension%jspd),chdr(dimension%nspd,dimension%jspd),chdt(dimension%nspd,dimension%jspd),&
& chdf(dimension%nspd,dimension%jspd),chdrr(dimension%nspd,dimension%jspd),chdtt(dimension%nspd,dimension%jspd),&
& chdff(dimension%nspd,dimension%jspd),chdtf(dimension%nspd,dimension%jspd),chdrt(dimension%nspd,dimension%jspd),&
& chdrf(dimension%nspd,dimension%jspd))
!$OMP DO
DO 190 jr = 1,atoms%jri(n)
!
! following are at points on jr-th sphere.
......@@ -415,7 +416,9 @@ CONTAINS
ENDDO
190 ENDDO
!$OMP END PARALLEL DO
!$OMP END DO
DEALLOCATE (ch,chdr,chdt,chdf,chdrr,chdtt,chdff,chdtf,chdrt,chdrf)
!$OMP END PARALLEL
! WRITE(6,'(/'' n='',i3/'' 9999vr''/(10d15.7))') n,
! & (((vr(jr,lh,n,js),jr=1,jri(n),100),lh=0,ntypsy(nat)),js=1,jspins)
......@@ -423,7 +426,6 @@ CONTAINS
! & ((excr(jr,lh,n),jr=1,jri(n),100),lh=0,ntypsy(nat))
200 ENDDO
DEALLOCATE (ch,chdr,chdt,chdf,chdrr,chdtt,chdff,chdtf,chdrt,chdrf)
DEALLOCATE (chlh,chlhdr,chlhdrr)
#ifdef CPP_MPI
......
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