Commit 7f1d1be2 authored by Daniel Wortmann's avatar Daniel Wortmann

Merge branch 'develop' of iffgit.fz-juelich.de:fleur/fleur into develop

parents e6de5340 9d5726e3
...@@ -64,7 +64,7 @@ contains ...@@ -64,7 +64,7 @@ contains
real :: sbf(0:atoms%lmaxd) real :: sbf(0:atoms%lmaxd)
real, allocatable, dimension(:,:) :: il, kl real, allocatable, dimension(:,:) :: il, kl
!$ COMPLEX vtl_loc(0:sphhar%nlhd,atoms%ntype) !$ complex, allocatable :: vtl_loc(:,:)
#ifdef CPP_MPI #ifdef CPP_MPI
include 'mpif.h' include 'mpif.h'
integer :: ierr(3) integer :: ierr(3)
...@@ -91,7 +91,8 @@ contains ...@@ -91,7 +91,8 @@ contains
!$omp parallel default( none ) & !$omp parallel default( none ) &
!$omp& shared( mpi, stars, vpw, oneD, atoms, sym, cell, sphhar, vtl ) & !$omp& shared( mpi, stars, vpw, oneD, atoms, sym, cell, sphhar, vtl ) &
!$omp& private( k, cp, pylm, nat, n, sbf, nd, lh, sm, jm, m, lm, l ) & !$omp& private( k, cp, pylm, nat, n, sbf, nd, lh, sm, jm, m, lm, l ) &
!$omp& private( vtl_loc ) !$omp& private( vtl_loc )
!$ allocate(vtl_loc(0:sphhar%nlhd,atoms%ntype))
!$ vtl_loc(:,:) = cmplx(0.d0,0.d0) !$ vtl_loc(:,:) = cmplx(0.d0,0.d0)
!$omp do !$omp do
do k = mpi%irank+2, stars%ng3, mpi%isize do k = mpi%irank+2, stars%ng3, mpi%isize
...@@ -114,10 +115,10 @@ contains ...@@ -114,10 +115,10 @@ contains
lm = l * ( l + 1 ) + m + 1 lm = l * ( l + 1 ) + m + 1
sm = sm + conjg( sphhar%clnu(jm,lh,nd) ) * pylm(lm,n) sm = sm + conjg( sphhar%clnu(jm,lh,nd) ) * pylm(lm,n)
end do end do
!$ if (.false.) then !$ if (.false.) then
vtl(lh,n) = vtl(lh,n) + cp * sbf(l) * sm vtl(lh,n) = vtl(lh,n) + cp * sbf(l) * sm
!$ end if !$ end if
!$ vtl_loc(lh,n) = vtl_loc(lh,n) + cp * sbf(l) * sm !$ vtl_loc(lh,n) = vtl_loc(lh,n) + cp * sbf(l) * sm
end do end do
nat = nat + atoms%neq(n) nat = nat + atoms%neq(n)
end do end do
...@@ -126,6 +127,7 @@ contains ...@@ -126,6 +127,7 @@ contains
!$omp critical !$omp critical
!$ vtl = vtl + vtl_loc !$ vtl = vtl + vtl_loc
!$omp end critical !$omp end critical
!$ deallocate(vtl_loc)
!$omp end parallel !$omp end parallel
#ifdef CPP_MPI #ifdef CPP_MPI
n1 = ( sphhar%nlhd + 1 ) * atoms%ntype n1 = ( sphhar%nlhd + 1 ) * atoms%ntype
......
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