From a17b27ed5035acd26a297501cb98e3c6b513a166 Mon Sep 17 00:00:00 2001 From: ccavazzoni Date: Wed, 23 Dec 2009 22:51:39 +0000 Subject: [PATCH] check on number of plane wave (npwx) should be modified for parallel execution (npwx is local whereas nbnd is global), otherwise it fails when using lots of processors. git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@6263 c92efa57-630b-4861-b058-cf58834340f0 --- PW/c_bands.f90 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/PW/c_bands.f90 b/PW/c_bands.f90 index 4493d5b9a..5aa9eec55 100644 --- a/PW/c_bands.f90 +++ b/PW/c_bands.f90 @@ -186,6 +186,7 @@ SUBROUTINE diag_bands( iter, ik, avg_iter ) USE becmod, ONLY : bec_type, becp, calbec, & allocate_bec_type, deallocate_bec_type USE klist, ONLY : nks + USE mp_global, ONLY : nproc_pool ! IMPLICIT NONE ! @@ -208,7 +209,7 @@ SUBROUTINE diag_bands( iter, ik, avg_iter ) ! ! ... allocate space for - used in h_psi and s_psi ! - IF ( nbndx > npwx ) & + IF ( nbndx > npwx*nproc_pool ) & CALL errore ( 'diag_bands', 'too many bands, or too few plane waves',1) ! CALL allocate_bec_type ( nkb, nbnd, becp )