BSE calculation of spin polarized system in 4.1.4

You can find here problems arising when using old releases of Yambo (< 5.0). Issues as parallelization strategy, performance issues and other technical aspects.

Moderators: Davide Sangalli, andrea.ferretti, myrta gruning, andrea marini, Daniele Varsano, Conor Hogan

Locked
wufeng
Posts: 24
Joined: Fri Dec 15, 2017 4:17 am

BSE calculation of spin polarized system in 4.1.4

Post by wufeng » Fri Dec 15, 2017 8:09 am

Dear Developers,
I met a problem when performing BSE calculation of spin polarized system with yambo 4.1.4. It raises an error at Wave Function Phases step:

Code: Select all

   [06.04.02] Wave-Function Phases
   ===============================
   [ERROR] STOP signal received while in :[06.04.02] Wave-Function Phases
   [ERROR]EMPTY WF index @ b:1 k:1 spin:2 ID:0
This error occurs for multiple different systems in parallel. For serial run there is no error.

From the source code, in src/parallel/PARALLEL_WF_index.F I found only the first spin is set during initialization:

Code: Select all

   do ib=1,NB
     b_filling(ib)=0
     if (states_to_load(ib,ik,1)) b_filling(ib)=1
   enddo
   !
   call PP_redux_wait(b_filling,COMM=PAR_COM_density%COMM)
   !
   do ib=1,NB
     if (b_filling(ib)==0.and.PAR_COM_density%CPU_id==0)  states_to_load(ib,ik,1)=.TRUE.
   enddo
And from debugger, states_to_load(1,1,2) is always FALSE so the error will be raised later when accessed.

I managed to change the line to

Code: Select all

 states_to_load(ib,ik,:)=.TRUE.
and the code works again. Not sure if the result is correct, however.

Is spin 2 skipped here as intended or is it a bug?

Thanks very much!
Feng Wu
Chemistry and Biochemistry department,
University of California, Santa Cruz
95064 CA, United States

wufeng
Posts: 24
Joined: Fri Dec 15, 2017 4:17 am

Re: BSE calculation of spin polarized system in 4.1.4

Post by wufeng » Fri Dec 15, 2017 6:39 pm

The input/output/LOG is attached.
You do not have the required permissions to view the files attached to this post.
Feng Wu
Chemistry and Biochemistry department,
University of California, Santa Cruz
95064 CA, United States

User avatar
Daniele Varsano
Posts: 4213
Joined: Tue Mar 17, 2009 2:23 pm
Contact:

Re: BSE calculation of spin polarized system in 4.1.4

Post by Daniele Varsano » Fri Dec 15, 2017 6:42 pm

Dear Feng Wu,
we have already reproduced the error you reported,
we will fix it as soon as possible and let you know.

Best,

Daniele
Dr. Daniele Varsano
S3-CNR Institute of Nanoscience and MaX Center, Italy
MaX - Materials design at the Exascale
http://www.nano.cnr.it
http://www.max-centre.eu/

User avatar
Davide Sangalli
Posts: 641
Joined: Tue May 29, 2012 4:49 pm
Location: Via Salaria Km 29.3, CP 10, 00016, Monterotondo Stazione, Italy
Contact:

Re: BSE calculation of spin polarized system in 4.1.4

Post by Davide Sangalli » Fri Dec 15, 2017 8:20 pm

Dear Feng Wu,
if you mean you replaced in src/parallel/PARALEL_WF_index.F

Code: Select all

     if (b_filling(ib)==0.and.PAR_COM_density%CPU_id==0)  states_to_load(ib,ik,1)=.TRUE.
with

Code: Select all

     if (b_filling(ib)==0.and.PAR_COM_density%CPU_id==0)  states_to_load(ib,ik,:)=.TRUE.
then I would say that your solution is correct, while the previous version was buggy.

D.
Davide Sangalli, PhD
CNR-ISM, Division of Ultrafast Processes in Materials (FLASHit) and MaX Centre
https://sites.google.com/view/davidesangalli
http://www.max-centre.eu/

wufeng
Posts: 24
Joined: Fri Dec 15, 2017 4:17 am

Re: BSE calculation of spin polarized system in 4.1.4

Post by wufeng » Sat Dec 16, 2017 12:01 am

Davide Sangalli wrote:Dear Feng Wu,
if you mean you replaced in src/parallel/PARALEL_WF_index.F

Code: Select all

     if (b_filling(ib)==0.and.PAR_COM_density%CPU_id==0)  states_to_load(ib,ik,1)=.TRUE.
with

Code: Select all

     if (b_filling(ib)==0.and.PAR_COM_density%CPU_id==0)  states_to_load(ib,ik,:)=.TRUE.
then I would say that your solution is correct, while the previous version was buggy.

D.
Yes that is exactly what I did. Thanks very much.
Feng Wu
Chemistry and Biochemistry department,
University of California, Santa Cruz
95064 CA, United States

martinspenke
Posts: 149
Joined: Tue Apr 08, 2014 6:05 am

Re: BSE calculation of spin polarized system in 4.1.4

Post by martinspenke » Wed Jan 03, 2018 4:22 am

Dear Davide,

I checked this line of code in 4.2.0, and the bug was present. However,
I never obtained the mentioned error above for a spin polarized system when performing BSE calculations!!!
Does this bug change the BSE results or only the parallelization efficiency?

Best,
Martin
Martin Spenke, PhD Student
Theoretisch-Physikalisches Institut
Universität Hamburg, Germany

User avatar
Davide Sangalli
Posts: 641
Joined: Tue May 29, 2012 4:49 pm
Location: Via Salaria Km 29.3, CP 10, 00016, Monterotondo Stazione, Italy
Contact:

Re: BSE calculation of spin polarized system in 4.1.4

Post by Davide Sangalli » Wed Jan 03, 2018 10:09 am

If the calculation were affected the code would have crashed, with the message

Code: Select all

       [06.04.02] Wave-Function Phases
       ===============================
       [ERROR] STOP signal received while in :[06.04.02] Wave-Function Phases
       [ERROR]EMPTY WF index @ b:1 k:1 spin:2 ID:0

However it only happens very seldom that such part of the code is activated.
In short, when computing the BSE kernel, yambo tries to get the matrix elements associated to k-points outside the IBZ by "rotating" the matrix elements in the IBZ.
To do that, it first check that there are no problems with the phase of the WFs. In some special cases there is a phase factor and the matrix element need to be recomputed.
In the unlucky case that the CPU which needs to compute the matrix element for k out of the IBZ has not the the corresponding WF in the IBZ among the list of WFs to be loaded in memory, the subroutine src/parallel/PARALEL_WF_index.F takes care of adding such WF to the list.

Best,
D.
Davide Sangalli, PhD
CNR-ISM, Division of Ultrafast Processes in Materials (FLASHit) and MaX Centre
https://sites.google.com/view/davidesangalli
http://www.max-centre.eu/

Locked