BSE matrix is too large, Cannot allocate memory

Deals with issues related to computation of optical spectra, solving the Bethe-Salpeter equation.

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

Post Reply
lyzhao
Posts: 63
Joined: Tue May 31, 2016 8:02 am

BSE matrix is too large, Cannot allocate memory

Post by lyzhao » Sat Mar 21, 2026 1:29 am

Dear all,
I am solving a BSE equation with very high dimension (8x8x900=57600), and the program indicates that memory cannot be allocated and stops at folding BSE kernel as follows

Code: Select all

Operating system error: Cannot allocate memory
Allocation would exceed memory limit
Operating system error: Cannot allocate memory
Allocation would exceed memory limit
--------------------------------------------------------------------------
Primary job  terminated normally, but 1 process returned
a non-zero exit code. Per user-direction, the job has been aborted.

Code: Select all

 <06s> P2: Loading full BSE kernel |                                        | [000%] --(E) --(X)
 <11s> P2: Loading full BSE kernel |#######################                 | [057%] 05s(E) 08s(X)
 <15s> P2: Loading full BSE kernel |########################################| [100%] 08s(E) 08s(X)
 <15s> P2: [09.02] BSE solver(s) @q1
 <15s> P2: [LA] SERIAL linear algebra
 <15s> P2: [09.03] Diago Solver @q1
 <15s> P2: Folding BSE Kernel |                                        | [000%] --(E) --(X)
Can I solve this by manually setting the parallel parameters?
Notes: My computer has 512GB memory, 32 core CPU, CentOS 7.9 linux OS, Yambo 5.2.4.
BSE input file
bse.zip
is generated by yambo -d s -o b -y d -k sex -V qp -F bse.in

Any help will be appreciated.
Best regards.
You do not have the required permissions to view the files attached to this post.
Youzhao Lan
College of Chemistry and Materials Science,
Zhejiang Normal University,
Jinhua, Zhejiang, China.
HomePage: http://blog.sciencenet.cn/u/lyzhao

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

Re: BSE matrix is too large, Cannot allocate memory

Post by Davide Sangalli » Sat Mar 21, 2026 8:13 am

Dear Youzhao Lan,
in the diagonalization solver the BSE matrix is not memory distributed (the parallelized version will enter in the next release).

If you need only the spectrum, you can use the Haddock solver. If you need the eigenvectors, you can use the slepc solver (the code must be linked against slepc). In both cases the BSE matrix will be distributed in memory. With slepc you can set the number of requested eigenvalues. It works well if you need only a few percent. Also I suggest to use the "explicit" version of the solver.

If none of the option above works, you can use the lumen fork of yambo, where memory distributed Scalapack and Elpa are coded. Again, you need to link against these libraries (at least Scalapack). See www.lumen-code.org

Best,
D.
Davide Sangalli, PhD
Piazza Leonardo Da Vinci, 32, 20133 – Milano
CNR, Istituto di Struttura della Materia (ISM)
https://sites.google.com/view/davidesangalli
http://www.max-centre.eu/

Post Reply