RPA FORCE calculations crash with vasp_gam

Problems running VASP: crashes, internal errors, "wrong" results.


Moderators: Global Moderator, Moderator

Locked
Message
Author
pinchenx
Newbie
Newbie
Posts: 2
Joined: Thu Mar 31, 2022 6:32 pm

RPA FORCE calculations crash with vasp_gam

#1 Post by pinchenx » Wed Apr 27, 2022 7:55 am

Hi,

I run ALGO=RPAR calculations with gamma-sampling and the LRPAFORCE option enabled. It runs fine with vasp_std but crashes definitely when using vasp_gam.
If I turn off LRPAFORCE, then everything works fine with vasp_gam.
The files for reproducing and also outputs is attached. The major error is:
Intel MKL ERROR: Parameter 8 was incorrect on entry to DSYEV.

VASP is compiled and running with
intel-mkl/2020.1/1/64
intel-mpi/intel/2019.7/64
You do not have the required permissions to view the files attached to this post.

merzuk.kaltak
Administrator
Administrator
Posts: 282
Joined: Mon Sep 24, 2018 9:39 am

Re: RPA FORCE calculations crash with vasp_gam

#2 Post by merzuk.kaltak » Fri Apr 29, 2022 4:40 pm

Dear pinchenx,

Thank you for your bug report, I can reproduce the problem and will look into it.
Do maybe have a smaller system where the same error appears?

merzuk.kaltak
Administrator
Administrator
Posts: 282
Joined: Mon Sep 24, 2018 9:39 am

Re: RPA FORCE calculations crash with vasp_gam

#3 Post by merzuk.kaltak » Wed May 04, 2022 4:14 pm

Dear pinchex,

thank you for the bug report.
I have identified the problem.
The LAPACK driver DSYEV is called with an insufficient size of the workspace array CWRK.
This fix will be in the next vasp-release as of version 6.3.1.
In case you want to fix the code by yourself, following changes are necessary in subrot_cluster.F.
Add a new variable declaration in line 279 of the subroutine SETUP_DEG_CLUSTERS like so:

Code: Select all

    ...
    INTEGER :: IFAIL
    INTEGER :: LWORK     !  size of work array
    
    NBANDS = SIZE(CHAM_DIAGONAL)
    ...
Then in line 300, when work arrays are allocated change the part as follows:

Code: Select all

    ...
    ! allocate work arrays
    ALLOCATE(U(NMAX_DEG,NMAX_DEG))
    !> allocate proper size of work array for gamma-only and complex version
#ifdef  gammareal
    LWORK=MAX( NMAX_DEG*NMAX_DEG, 3*NMAX_DEG-1 )
#else
    LWORK=MAX( NMAX_DEG*NMAX_DEG, 2*NMAX_DEG+1 )
#endif
    ALLOCATE(CWRK(LWORK) )
    ALLOCATE(RWORK(3*NMAX_DEG))
    ALLOCATE(R(NMAX_DEG))
    ... 
Finally, when the LAPACK driver are called in line 342, replace the NMAX_DEG*NMAX_DEG by LWORK as follows:

Code: Select all

...
#ifdef  gammareal
       CALL __DSYEV__ &
            ('V','U',NB_TOT,U(1,1),NMAX_DEG, &
            R,CWRK,LWORK,IFAIL)
#else
       CALL __ZHEEV__ &
            ('V','U',NB_TOT,U(1,1),NMAX_DEG, &
            R,CWRK,LWORK,RWORK,IFAIL)
#endif
...
After these changes, compile vasp. This should fix your problem

pinchenx
Newbie
Newbie
Posts: 2
Joined: Thu Mar 31, 2022 6:32 pm

Re: RPA FORCE calculations crash with vasp_gam

#4 Post by pinchenx » Thu May 05, 2022 1:42 am

Hi Merzuk,

Thank you so much for the fix!!!

best,
Pinchen

Locked