I made a patch for VASP 6.4.3 that should solve this problem by using 8 byte integers in this routine.
However, I think that this is really not the optimal way to write out all the eigenvectors. Could you describe what exactly you need all the eigenvectors for and how you intend to use them, so that we could find a better mechanism for writing out the full BSE matrix and/or all eigenvectors.
Code: Select all
diff --git a/src/bse.F b/src/bse.F
index 6420e3931..50cf2bfc7 100644
--- a/src/bse.F
+++ b/src/bse.F
@@ -1440,7 +1440,7 @@ ccintegration: DO IALPHA=1,NALPHA
IF ( LscaLAPACKaware) THEN
#ifdef scaLAPACK
CALL WRITE_BSE_SCALA(WHF, ISP_LOW, ISP_HIGH, &
- BD, BSE_INDEX, R, AMAT_SCALA, NCV, NBSEEIG, IO%IU6, BSE_DESC)
+ BD, BSE_INDEX, R, AMAT_SCALA, INT(NCV,8), INT(NBSEEIG,8), IO%IU6, BSE_DESC)
#endif
ELSE
IF (IO%IU6>=0) THEN
@@ -5663,12 +5663,12 @@ cp: DO N=1,WHF%WDES%COMM_INTER%NCPU
TYPE (wavespin) WHF
TYPE (latt) LATT_CUR
TYPE(bse_matrix_index) :: BSE_INDEX
- INTEGER :: NCV
- INTEGER :: NBSEEIG
+ INTEGER(8) :: NCV
+ INTEGER(8) :: NBSEEIG
COMPLEX(q) :: EIGVECT(:)
REAL(q) :: R(:)
! local
- INTEGER K1,K2,K3,K4,NPOS1,NPOS2,MINL
+ INTEGER(8) K1,K2,K3,K4,NPOS1,NPOS2,MINL
INTEGER I, J
INTEGER :: LAMBDA, ISP
REAL(q) :: RIP(NCV),MINV
@@ -5853,7 +5853,7 @@ cp: DO N=1,WHF%WDES%COMM_INTER%NCPU
#else
GDEF :: AMAT(:)
#endif
- INTEGER :: NCV
+ INTEGER(8) :: NCV
INTEGER :: ANTIRES
INTEGER :: IU6
! local
@@ -5867,12 +5867,12 @@ cp: DO N=1,WHF%WDES%COMM_INTER%NCPU
INTEGER, OPTIONAL :: DESC(DLEN_)
!MB
COMPLEX(q), ALLOCATABLE :: EIGVECT(:)
- INTEGER :: NBSEEIG
+ INTEGER(8) :: NBSEEIG
! BLACS variables
INTEGER, EXTERNAL :: NUMROC
INTEGER MYROW, MYCOL, NPROW, NPCOL, NP,NQ
- INTEGER I1RES, J1RES, IROW, JCOL
+ INTEGER(8) I1RES, J1RES, IROW, JCOL
INTEGER I1, I2, J1, J2
!Large NBSEEIG value can overrun the memory of a local node.
@@ -5938,7 +5938,7 @@ cp: DO N=1,WHF%WDES%COMM_INTER%NCPU
!Gather all parts of the eigenvectors stored on the different nodes
! CALLMPI( M_sum_z(WHF%WDES%COMM, EIGVECT, NBSEEIG*NCV))
- CALLMPI( M_sum_z(WHF%WDES%COMM_INTER, EIGVECT, NBSEEIG*NCV))
+ CALLMPI( M_sum_z8(WHF%WDES%COMM_INTER, EIGVECT, NBSEEIG*NCV))
IF (IU6>=0) CALL WRITE_BSE(WHF,NCV,BSE_INDEX,EIGVECT,R,NBSEEIG)
DEALLOCATE(EIGVECT)