BS Seg. Fault

Various technical topics such as parallelism and efficiency, netCDF problems, the Yambo code structure itself, are posted here.

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

mdvorak
Posts: 15
Joined: Tue Apr 19, 2011 6:27 am

BS Seg. Fault

Post by mdvorak » Wed Apr 20, 2011 7:37 pm

Hello Developers,

I have run across a segmentation fault using Yambo for a BS calculation. On a simple test run, I am using a 2x2x2 k point grid in Abinit and using Yambo to perform direction diagonalization of the BS matrix. This runs fine. When I increase the k points to, for example, 6x6x6, Yambo dies when it tries to diagonalize the matrix. I am puzzled since the only difference between the two runs is the number of k points. Haydock works fine with as many k points as I want. All relevant files are attached (except the pseudopotential -- made the file too big). I have been running (trying) yambo -p p -o b -y d.

Thanks in advance,
Marc Dvorak
You do not have the required permissions to view the files attached to this post.
Marc Dvorak, PhD student
Physics Department
Colorado School of Mines

User avatar
claudio
Posts: 458
Joined: Tue Mar 31, 2009 11:33 pm
Location: Marseille
Contact:

Re: BS Seg. Fault

Post by claudio » Fri Apr 22, 2011 9:19 am

Dear Mark

perhaps the size of the BSE matrix is too large, 158976
and so when you call lapack to diagonalize it, it crashes because it requires too much memory.

Try to reduce the number of bands in the BSE, for example

% BSEBands
1 | 10 | # [BSK] Bands range
%

that I thinks should be sufficient to have a converged absorption spectra.

Notice that for a converged result, you should also increase the size of dielectric constants,
and screened interaction namely

BSENGBlk= 1 RL # [BSK] Screened interaction block size
NGsBlkXp = 1 RL # [Xp] Response block size

regards
Claudio
Claudio Attaccalite
[CNRS/ Aix-Marseille Université/ CINaM laborarory / TSN department
Campus de Luminy – Case 913
13288 MARSEILLE Cedex 09
web site: http://www.attaccalite.com

mdvorak
Posts: 15
Joined: Tue Apr 19, 2011 6:27 am

Re: BS Seg. Fault

Post by mdvorak » Mon Apr 25, 2011 1:53 am

Hello Claudio,

Thanks for the advice. Unfortunately, reducing the band number did not solve the problem. Yambo still crashes when it gets to the diagonalization solver, and with fewer bands it produces no error message at all. Any other suggestions? This certainly does look like a memory problem since Yambo crashes as I increase the kpts, but I have tons of memory to work with (48 Gb, to be exact). It seems like such a routine job, I'm really confused by what is stopping it. Until I get this working, I am hesitant to raise convergence parameters any further. Is there something fundamentally wrong with running yambo -p p -o b -y d that I am missing? I am primarily interested in the BSE eigenvectors, so Haydock just won't do :( .

Thanks,
Marc
Marc Dvorak, PhD student
Physics Department
Colorado School of Mines

User avatar
claudio
Posts: 458
Joined: Tue Mar 31, 2009 11:33 pm
Location: Marseille
Contact:

Re: BS Seg. Fault

Post by claudio » Mon Apr 25, 2011 8:04 am

Dear Marc

let's try to find this bug.
Which is the size of the BSE when you have only 10 bands?
Do you link Yambo with some special Lapack version, or use the internal libraries?
Which compiler are you using, and with which options?
put on the forum also the inputs you used for the DFT,
in such a way I can try to reproduce the calculation

Claudio
Claudio Attaccalite
[CNRS/ Aix-Marseille Université/ CINaM laborarory / TSN department
Campus de Luminy – Case 913
13288 MARSEILLE Cedex 09
web site: http://www.attaccalite.com

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

Re: BS Seg. Fault

Post by myrta gruning » Mon Apr 25, 2011 12:05 pm

Dear Marc

as a side remark I will advise to converge results using Haydock and at last running the diagonalization for the smallest set of parameters that gives you converged results in the energy range you wish.

A further remark is that usually static screening is used (invoked by yambo -b -o b -y d)

Best,
m
Dr Myrta Grüning
School of Mathematics and Physics
Queen's University Belfast - Northern Ireland

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

mdvorak
Posts: 15
Joined: Tue Apr 19, 2011 6:27 am

Re: BS Seg. Fault

Post by mdvorak » Tue Apr 26, 2011 5:07 am

Dear Claudio,
The dimension of the BS kernel is 20736 when I reduce to 10 bands. As far as compilation, I am not the system admin. and did not compile this but I can share with you what little I was told. The build script was:


export FCFLAGS='-O3 -xW -tpp7 -assume bscc -nofor_main'
export FCFLAGS='-O3'
export FCFLAGS='-O3 -nofor_main'
export FC=mpif90
#./configure --with-netcdf-lib=/opt/netcdf/4.0.1/lib --with-netcdf-include=/opt/netcdf/4.0.1/include
./configure --with-blacs=no --with-netcdf-lib=/opt/netcdf/4.0.1/lib --with-netcdf-include=/opt/netcdf/4.0.1/include

So this case it looks like it used a version of blas and lapack built on
the fly. I just checked and found that the files in /opt/netcdf/4.0.1/lib
are the same as the *cdf* files in the build directory.


I've attached a tar file with all the Abinit files (minus the pseudopotential) and the Yambo logs. Thank you for the help, I hope I've given you enough information.

I can always use the static screening, Myrta. I believe that ran smoothly for me in the past and am testing now to make sure of that. I am somewhat interested in exploring differences in results between the two cases (static vs. dynamical) for my own satisfaction. Can you suggest a publication on this or share any insight?

Thank you,
Marc
You do not have the required permissions to view the files attached to this post.
Marc Dvorak, PhD student
Physics Department
Colorado School of Mines

User avatar
claudio
Posts: 458
Joined: Tue Mar 31, 2009 11:33 pm
Location: Marseille
Contact:

Re: BS Seg. Fault

Post by claudio » Tue Apr 26, 2011 8:21 am

Dear Marc

the BSE matrix is still large, try to reduce the bands to 8, probably in this case it will work.
Then increase this number again untill you get a converged result. You can also
decrease the number of valence bands, starting from 2 or 3 instead that 1.

About the difference between static and dynamics dielectric constant, there is not difference,
because the BSE uses only the static part of dielectric constant anyway.
About the BSE you can have a look to the lecture notes on Yambo or to the Bussi and Strinati papers
on the lecture notes page: http://www.yambo-code.org/lectures.php

Anyways as Myrta advised you, you should use Haydock for large systems instead of the full diagonalization.

Claudio
Claudio Attaccalite
[CNRS/ Aix-Marseille Université/ CINaM laborarory / TSN department
Campus de Luminy – Case 913
13288 MARSEILLE Cedex 09
web site: http://www.attaccalite.com

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

Re: BS Seg. Fault

Post by Daniele Varsano » Tue Apr 26, 2011 8:29 am

Dear Marc,
I agree with Claudio, the matrix is still too large.
If you need eigenvector, you are obliged to reduce the matrix dimension!!!

About dynamic vs static screening in BSE you can have a look to this couple
of papers:

Dynamical excitonic effects in metals and semiconductors
A. Marini, R. Del Sole,
Phys. Rev. Lett., 91, 176402 (2003).
you can find it in the publication part of the yambo site.

Catalin D. Spataru* and Franc ̧ois Le ́onard
PRL 104, 177402 (2010)

About the possibility to use dynamical screening in Yambo for BSE,
this is surely not implemented in the GPL version of the code.
Andrea worked on that in the past and he can surely tell you more information.

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/

mdvorak
Posts: 15
Joined: Tue Apr 19, 2011 6:27 am

Re: BS Seg. Fault

Post by mdvorak » Fri May 27, 2011 1:36 am

Hi Developers,
Can anyone shed some insight into why the matrix dimension is limited? I am not even close to the memory capacity of my system. I think that as long as I have enough memory to handle a larger matrix, it should run OK? I am looking at exciton binding energies and am very worried about convergence, especially with respect to the number of k points. The binding energies are too large right now, and still changing dramatically with k-points. Binding energies at 4x4x4 and 6x6x6 are 153 meV and 105 meV, respectively, looking very under-converged. Unfortunately, I cannot continue testing the convergence because the matrix becomes too large. From what I've read in the literature, accurate binding energy calculations take many k points (hundreds or more), consistent with what I observe.
Thank you for any help,
Marc
Marc Dvorak, PhD student
Physics Department
Colorado School of Mines

User avatar
claudio
Posts: 458
Joined: Tue Mar 31, 2009 11:33 pm
Location: Marseille
Contact:

Re: BS Seg. Fault

Post by claudio » Sat May 28, 2011 9:45 pm

Dear Mark

may you put on the forum also your abinit input files?
About the convergence of the excitons binding energy, remember that you should converge also the
NGsBlkXp and BSENGBlk parameters.

Try also
1) to include less bands for example from 1-8 or 2-7 and test it again,
2) to generate the input with "yambo -b -o b -y d -V resp"
a new variable will appear

% BSEEhEny
-1.000000 |-1.000000 | eV # [BSK] Electron-hole energy range
%

set the Electron-hole range from 0 to 10 eV and check if the size of the matrix decrease. Let us know
Cla
Claudio Attaccalite
[CNRS/ Aix-Marseille Université/ CINaM laborarory / TSN department
Campus de Luminy – Case 913
13288 MARSEILLE Cedex 09
web site: http://www.attaccalite.com

Post Reply