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 9d5726e3 authored by Uliana Alekseeva's avatar Uliana Alekseeva
Browse files

A private automatic array made allocatable to preven OpenMP stack oversize

parent c041af83
......@@ -64,7 +64,7 @@ contains
real :: sbf(0:atoms%lmaxd)
real, allocatable, dimension(:,:) :: il, kl
!$ COMPLEX vtl_loc(0:sphhar%nlhd,atoms%ntype)
!$ complex, allocatable :: vtl_loc(:,:)
#ifdef CPP_MPI
include 'mpif.h'
integer :: ierr(3)
......@@ -92,6 +92,7 @@ contains
!$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( vtl_loc )
!$ allocate(vtl_loc(0:sphhar%nlhd,atoms%ntype))
!$ vtl_loc(:,:) = cmplx(0.d0,0.d0)
!$omp do
do k = mpi%irank+2, stars%ng3, mpi%isize
......@@ -126,6 +127,7 @@ contains
!$omp critical
!$ vtl = vtl + vtl_loc
!$omp end critical
!$ deallocate(vtl_loc)
!$omp end parallel
#ifdef CPP_MPI
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