BSE diagonalization solver error

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

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

Re: BSE diagonalization solver error

Post by Davide Sangalli » Wed Apr 01, 2020 9:35 am

Just because I wanted to use the double-grid method to save k-points! I don't think I can do this in other schemes?
You are right.
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/

haseebphysics1
Posts: 169
Joined: Sat Aug 17, 2019 2:48 pm

Re: BSE diagonalization solver error

Post by haseebphysics1 » Sun Apr 12, 2020 12:15 am

Hi developers,

I've encountered the following error while diagonalizing the BSE matrix.

Code: Select all

 <01m-49s> P4-compute-0-2.local: [WARNING]Allocation attempt of WS%v_cmplx of zero size.
P4-compute-0-2.local: [ERROR] STOP signal received while in :[07.01] Diago Solver @q1
P4-compute-0-2.local: [ERROR]LINEAR ALGEBRA driver [PARALLEL_HERMITIAN_diagonalization]:performing P(Z/C)HEEV
All the relevant files are attached to identify the problem.


Thanks,
You do not have the required permissions to view the files attached to this post.
Haseeb Ahmad
MS - Physics,
LUMS - Pakistan

haseebphysics1
Posts: 169
Joined: Sat Aug 17, 2019 2:48 pm

Re: BSE diagonalization solver error

Post by haseebphysics1 » Sat Jun 27, 2020 1:00 pm

Dear developers,

I have done BSE with Haydock and diagonalization solvers using the same parameters, but I am not convinced that both of them produce the same spectrum!

I have attached two output files, and kindly see the values of imaginary parts of EPS from 2.318 eV!

1: Why these two calculations are not matching with each other!

2: And 2nd question is can I use the DBsIOoff= "BS" in the digo solver if I don't want to access the exciton? What was the key to activate this IO in the BSE input file?

Thanks,
You do not have the required permissions to view the files attached to this post.
Haseeb Ahmad
MS - Physics,
LUMS - Pakistan

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

Re: BSE diagonalization solver error

Post by Daniele Varsano » Sun Jun 28, 2020 7:32 am

Dear Haseeb,

1. It seems the Haydock calculations is not perfectly converged. You can plot column 1:2 and column 1:6 which contain the spectrum at the previous iteration. You can lower the BSHayTrs to have a stricter convergence. Besides that, check the two calculations have the same blk in the screening (NGsBlkXs): from the output I can see one is calculated using 5Ry, in the other case 695 RL, check the two are equivalent, this is reported in the report file.

2. DBsIOoff= "BS" avoids the writing of the BS kernel. The BSdiago database instead it is always written. It contains just the eigenvalues unless you activate the WRbsWF flag, in that case, also the eigenvectors are written in the same file.

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/

haseebphysics1
Posts: 169
Joined: Sat Aug 17, 2019 2:48 pm

Re: BSE diagonalization solver error

Post by haseebphysics1 » Tue Jun 30, 2020 4:07 pm

Dear Daniele, thanks for your help.


I again have rerun the calculations. But the problem is after 1000 Haydock iteration, it stopped even though I think the Haydock criteria was not reached. So, is it slowly converging? files are attached.

Is there any variable to control the max number of iterations?


Thanks,
You do not have the required permissions to view the files attached to this post.
Haseeb Ahmad
MS - Physics,
LUMS - Pakistan

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

Re: BSE diagonalization solver error

Post by Daniele Varsano » Wed Jul 01, 2020 7:47 am

Dear Haseeb,

Looking at the log files you posted the algorithm is not converging.
It is possible that this is due to the low damping you are using: 0.0020 , you can try to raise it.
Anyway, I'm not an expert of the Haydock procedure, and possibly someone else can advise you on that.

In any case in order to increase the max number of iteration (not useful here),
you will need to change the max number inside the code in:
/src/bse/K_Haydock.F

around line 57 you will find:

Code: Select all

integer, parameter ::Max_iterations=1000
You can increase it and recompile.

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/

haseebphysics1
Posts: 169
Joined: Sat Aug 17, 2019 2:48 pm

Re: BSE diagonalization solver error

Post by haseebphysics1 » Sun Aug 30, 2020 9:12 pm

Dear Daniele,

For the diagonalization of the BSE matrix, it becomes a tedious task if the dimension of the matrix is large, as one can predict.
However, I want to know that assuming one needs to do BSE diagonalization for v. large matrix (around 200k +), then can we incorporate any parallelization strategy to fastens the process in diagonalization?

Till now, I've experienced that using parallel linear algebra (scaclepack) decreases the performance instead of any gain (even with 4 parallel BSE_digo CPUs).

Aside: Just to mention it that usually I always do Haydock approach, but here I want to see exciton BE from ypp utility for large K-points, that's why dimension is large and diagonalization is inevitable.

Thanks,
Haseeb Ahmad
MS - Physics,
LUMS - Pakistan

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

Re: BSE diagonalization solver error

Post by Daniele Varsano » Mon Aug 31, 2020 7:34 am

Dear Haseeb,

direct diagonalization of matrixes with 299k dimension is not feasible even using parallel linear algebra, you need to resort to opt for iterative algorithm.
It is possible to obtain the first eigenvectors via iterative methods by using the slepc library, you need to link them (--with-slepc-lib etc..). I do not have much experience with them, but you can check the forum or maybe others with more experience can advise you on that.

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/

haseebphysics1
Posts: 169
Joined: Sat Aug 17, 2019 2:48 pm

Re: BSE diagonalization solver error

Post by haseebphysics1 » Fri Sep 04, 2020 2:24 pm

Dear Daniele,
Daniele Varsano wrote: Mon Aug 31, 2020 7:34 am Dear Haseeb,

direct diagonalization of matrixes with 299k dimension is not feasible even using parallel linear algebra, you need to resort to opt for iterative algorithm.
It is possible to obtain the first eigenvectors via iterative methods by using the slepc library, you need to link them (--with-slepc-lib etc..). I do not have much experience with them, but you can check the forum or maybe others with more experience can advise you on that.

Best,
Daniele
It is possible to obtain the first eigenvectors via iterative methods by using the slepc library
This is interesting, but I could not find more info about it in the docs. So, I have some questions.

1: "First eigenvectors"! To be precise, how many first eigenvalues? can we control via some variables in the input file.

2: What should be the run-level for the BSE with slecpc? Or what should be changed in the input file?

3: Is the method remains iterative (Haydock)?

PS: I have just compiled Yambo 4.5.1, now with slepc using internal slepc adding

Code: Select all

--enable-slepc-linalg  --enable-par-linalg
in the configure, and wanted to see, if this actually works by doing a test BSE!

Thanks,
Haseeb Ahmad
MS - Physics,
LUMS - Pakistan

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

Re: BSE diagonalization solver error

Post by Davide Sangalli » Fri Sep 04, 2020 4:05 pm

Dear Haseeb,

1: "First eigenvectors"! To be precise, how many first eigenvalues? can we control via some variables in the input file.
There is an input variable

Code: Select all

BSSNEig= N
By default the first N. If you instead also specify

Code: Select all

BSSEnTarget = E  [eV] 
it will give you the first N above such energy
2: What should be the run-level for the BSE with slecpc? Or what should be changed in the input file?
It is a BSE calculation with the slepc solver

Code: Select all

yambo -o b -k sex -y s (-V resp)

Code: Select all

BSSmod="s"
3: Is the method remains iterative (Haydock)?
Yes, it is iterative with a default threshold.
You can change it

Code: Select all

BSSSlepcTol 
Usually the default is safe.

More. You can specify (or not)

Code: Select all

BSSSlepcShell
Without it is faster but uses more memory, with is uses less memory but it is slower.

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/

Post Reply