Page 1 of 1

BSE matrix is too large, Cannot allocate memory

Posted: Sat Mar 21, 2026 1:29 am
by lyzhao
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.

Re: BSE matrix is too large, Cannot allocate memory

Posted: Sat Mar 21, 2026 8:13 am
by Davide Sangalli
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.