crash for large values of BSENGBlk

Deals with issues related to computation of optical spectra in reciprocal space: RPA, TDDFT, local field effects.

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

Post Reply
lawson
Posts: 3
Joined: Thu Mar 26, 2009 6:50 pm

crash for large values of BSENGBlk

Post by lawson » Fri Mar 27, 2009 11:21 pm

I am getting a crash in Yambo 3.2.1-r363 when I use larger values of BSENGBlk in a BSE calculation for diamond.
I'm running on an itantium2 cluster and I compiled with ifort 10.1.013. I recompiled with -check and got the following diagnostics:

forrtl: severe (408): fort: (2): Subscript #1 of the array G_M_G has value 28 which is greater than the upper bound of 27

Image PC Routine Line Source
yambo 4000000001D5CCD0 Unknown Unknown Unknown
yambo 4000000001D5A760 Unknown Unknown Unknown
yambo 4000000001CCF410 Unknown Unknown Unknown
yambo 4000000001C5A490 Unknown Unknown Unknown
yambo 4000000001C58A70 Unknown Unknown Unknown
yambo 4000000000078890 k_ 477 K.f90
yambo 40000000000148C0 k_driver_ 139 K_driver.f90
yambo 400000000000FA90 yambo_driver_ 203 yambo_driver.f90
yambo 40000000000076F0 Unknown Unknown Unknown
libc.so.6.1 2000000005B77C20 Unknown Unknown Unknown
yambo 4000000000004F80 Unknown Unknown Unknown
MPI: MPI_COMM_WORLD rank 0 has terminated without calling MPI_Finalize()
MPI: aborting job

Below are the abinit and yambo inputs I am using. I've set the parameters so that the crash occurs very quickly.
Any help would be very much appreciated.

Thanks!
John




* Diamond Abinit Input
ndtset 2

# Definition of the unit cell: fcc
acell 3*3.54 Angstrom
rprim 0.0 0.5 0.5 # FCC primitive vectors
0.5 0.0 0.5
0.5 0.5 0.0

# Definition of the system
ntypat 1 # Number of species
znucl 6 # Z number of each species
natom 2 # Number of atoms
typat 1 1 # Type of each atom (index in znucl)
xred 0.0 0.0 0.0 # Reduced coordinates of atom 1
0.25 0.25 0.25 # Reduced coordinates of atom 2

# Step 1: determine the ground state
symmorphi1 0 # Disallow non-symmorphic operations (required)
ecut1 8
iscf1 5
toldfe1 5.0d-8
nstep1 100
nband1 6
prtden1 1
kptopt1 1 # Automatic generation of k-points
ngkpt1 8 8 8
nshiftk1 1
shiftk1 0.5 0.5 0.5

# Step 2: obtain the Kohn-Sham band structure
symmorphi2 0 # Disallow non-symmorphic operations (required)
ecut2 8
iscf2 -2
tolwfr2 5.0d-18
nstep2 100
nband2 40
getden2 1
kptopt2 1
ngkpt2 2 2 2
nshiftk2 1
shiftk2 0.5 0.5 0.5
kssform2 3 # Format of the KSS file
nbandkss2 40 # Number of bands to output to the KSS file
istwfk2 2*1


#
# Y88b / e e e 888~~\ ,88~-_
# Y88b / d8b d8b d8b 888 | d888 \
# Y88b/ /Y88b d888bdY88b 888 _/ 88888 |
# Y8Y / Y88b / Y88Y Y888b 888 \ 88888 |
# Y /____Y88b / YY Y888b 888 | Y888 /
# / / Y88b / Y888b 888__/ `88_-~
#
# GPL Version 3.2.1 Revision 363
# http://www.yambo-code.org
#
optics # [R OPT] Optics
bse # [R BSK] Bethe Salpeter Equation.
bss # [R BSS] Bethe Salpeter Equation solver
StdoHash= 20 # [IO] Live-timing Hashes
FFTGvecs= 113 RL # [FFT] Plane-waves
NonPDirs= "none" # [X/BSS] Non periodic chartesian directions (X,Y,Z,XY...)
KfnQPdb= "none" # [EXTQP BSK BSS] Database
KfnQP_N= 1 # [EXTQP BSK BSS] Interpolation neighbours
% KfnQP_E
0.000000 | 1.000000 | 1.000000 | # [EXTQP BSK BSS] E parameters (c/v)
%
% KfnQP_W
0.000 | 0.000 | 0.000 | 0.000 | # [EXTQP BSK BSS] W parameters (c/v)
%
KfnQP_Z= ( 1.000000 , 0.000000 ) # [EXTQP BSK BSS] Z factor (c/v)
BSresKmod= "xc" # [BSK] Resonant Kernel mode. (`x`;`c`;`d`,`u`)
% BSEBands
1 | 40 | # [BSK] Bands range
%
BSENGBlk= 113 RL # [BSK] Screened interaction block size
BSENGexx= 113 RL # [BSK] Exchange components
BSSmod= "h" # [BSS] Solvers `h/d/i/t`
% BEnRange
0.00000 | 40.00000 | eV # [BSS] Energy range
%
% BDmRange
0.10000 | 0.10000 | eV # [BSS] Damping range
%
BEnSteps= 400 # [BSS] Energy steps
% BLongDir
1.000000 | 0.000000 | 0.000000 | # [BSS] [cc] Electric Field
%
#WRbsWF # [BSS] Write to disk excitonic the FWs
BSHayTrs= -0.02000 # [BSS] [o/o] Haydock treshold. Strict(>0)/Average(<0)
John Lawson
NASA Ames Research Center

User avatar
myrta gruning
Posts: 240
Joined: Tue Mar 17, 2009 11:38 am
Contact:

Re: crash for large values of BSENGBlk

Post by myrta gruning » Mon Mar 30, 2009 7:21 pm

Dear John,

thank you very much for pointing out this problem and for preparing a small input that reproduces the problem. The crash was indeed due to a small bug that we corrected. I sent the patch to Andrea that will include it asap in the svn repository. We will reply this post to tell you when you can update your source to include this fix.

Note that you cannot choose such "large" values for BSENGBlk. If you look at the expression of the coupling part in reciprocal space that is given in the yambo documentation
http://www.yambo-code.org/doc/docs/doc_BSK.php
you see you have sums q+G appearing. Then, the maximum G you can choose is limited by the fact that the vector resulting from the sum with the largest q has to be in the sphere defined by your cutoff. For example in your case the RL compatibles with the cutoff and the q vectors are just the first 27.

With the fix the code will check whether the chosen value for BSENGBlk is compatible with the other parameters, and in the case is too large will resize it to the maximum possible value and write a warning to the standard output and report file.
This limitation is not (usually) a problem since typically one obtains a converged spectrum with not very large values for BSENGBlk. Note as well that a large value for BSENGBlk makes the calculations much slower, so one should try to keep it as small as possible.

I hope this helps you and as a said the patch will be available soon via svn,
cheers
Myrta
Dr Myrta Grüning
School of Mathematics and Physics
Queen's University Belfast - Northern Ireland

http://www.researcherid.com/rid/B-1515-2009

User avatar
andrea marini
Posts: 325
Joined: Mon Mar 16, 2009 4:27 pm
Contact:

Re: crash for large values of BSENGBlk

Post by andrea marini » Mon Mar 30, 2009 9:29 pm

myrta gruning wrote: thank you very much for pointing out this problem and for preparing a small input that reproduces the problem. The crash was indeed due to a small bug that we corrected. I sent the patch to Andrea that will include it asap in the svn repository. We will reply this post to tell you when you can update your source to include this fix.
Dear John,

the patch is in the repository (rev. 383). Please test it and tell us if it solves your problem so that we can close this post.

Thanks for your bug-tracking help :mrgreen:

Andrea
Andrea MARINI
Istituto di Struttura della Materia, CNR, (Italy)

lawson
Posts: 3
Joined: Thu Mar 26, 2009 6:50 pm

Re: crash for large values of BSENGBlk

Post by lawson » Tue Apr 07, 2009 12:17 am

Dear Myrta and Andrea,

Thanks very much for your quick attention and also the comments about the cutoff. The problem appears to be fixed.

It might be useful to know (perhaps in the setup files (?)) the max value of BSENGBlk. That way you could avoid calculating
dielectric matrices that are too big for your BSE calculation.

I understand that in general you can use a much smaller value for BSENGBlk. Is it correct that you can reliably converge
the value of BSENGBlk by doing a series of "diagonal only" calculations?

Thanks again for your help,
John
John Lawson
NASA Ames Research Center

User avatar
andrea marini
Posts: 325
Joined: Mon Mar 16, 2009 4:27 pm
Contact:

Re: crash for large values of BSENGBlk

Post by andrea marini » Tue Apr 07, 2009 8:57 am

lawson wrote: It might be useful to know (perhaps in the setup files (?)) the max value of BSENGBlk. That way you could avoid calculating
dielectric matrices that are too big for your BSE calculation.
Well, as in general the value of BSENGBlk is smaller than the available number of G-vectors, this max value could be misleading, pointing the user a value that would be really too large to use.
Nevertheless I will think about adding a comment before doing the screened interaction section.
lawson wrote: I understand that in general you can use a much smaller value for BSENGBlk. Is it correct that you can reliably converge
the value of BSENGBlk by doing a series of "diagonal only" calculations?
You area absolutely right :!: To converge BSENGBlk you can even use a small grid of k-points, bands etc etc. When you do not see any shift in the position of the peaks than you have a first idea of the value to use for BSENGBlk. Then you remove the "diagonal only" option and repeat the calculation with two values to test that the "converged" value is correct.

Convergence is like finding by hand the minimum of a function of N variables. You cannot do it easily, so you have to get smart 8-) Fix N-1 and move the Nth.... use energy and physical arguments, try and check ...

Andrea
Andrea MARINI
Istituto di Struttura della Materia, CNR, (Italy)

Post Reply