Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Davidson solver out-of-bounds read #206

Open
v1kko opened this issue Aug 9, 2022 · 1 comment
Open

Davidson solver out-of-bounds read #206

v1kko opened this issue Aug 9, 2022 · 1 comment

Comments

@v1kko
Copy link
Collaborator

v1kko commented Aug 9, 2022

The davidson solver has an out-of-bounds access problem. Even when increasing the array size we get Floating point errors so something is wrong

branch

main

compile flags

cmake ../ -DCMAKE_Fortran_COMPILER=mpifort -DCMAKE_BUILD_TYPE=DEBUG

command

> champ/tests/CI_test/VMC-H2$ mpirun.openmpi -n 1 ~/local_projects/champ/bin/vmc.mov1 -i revised_vmc_lin.inp

output

DAV: Setup subspace problem
DAV: Diagonal-Preconditioned-Residue (DPR)
DAV: tolerance         :  0.100E+00
DAV: Number eigenvalues :          2
DAV: Update size        :          4
DAV: Max basis size     :         10
DAV: Modified Gram-Schmidt orthogonalization with projection update
DAV: -----------------------------
DAV: Iteration:          1
DAV: Basis size:          4
At line 519 of file /home/vikko/local_projects/champ/src/vmc/davidson.f90
Fortran runtime error: Index '3' of dimension 1 of array 'has_converged' above upper bound of 2

Error termination. Backtrace:
DAV: eigv-0.10371D+01-0.36620D+00
DAV: resd 0.16624D+02 0.18019D+03
DAV: Root not yet converged     :          2
#0  0x7fdddd4c7ae0 in ???
#1  0x7fdddd4c8659 in ???
#2  0x7fdddd4c8c56 in ???
#3  0x55e4301dca7b in __davidson_MOD_compute_dpr
	at /home/vikko/local_projects/champ/src/vmc/davidson.f90:523
#4  0x55e4301e167e in __davidson_MOD_generalized_eigensolver
	at /home/vikko/local_projects/champ/src/vmc/davidson.f90:319
#5  0x55e4301e35f4 in __davidson_wrap_mod_MOD_davidson_wrap
	at /home/vikko/local_projects/champ/src/vmc/davidson_wrap.f90:66
#6  0x55e4301ce01d in __optwf_lin_dav_more_MOD_lin_d
	at /home/vikko/local_projects/champ/src/vmc/optwf_lin_dav_more.f:82
#7  0x55e4301ba629 in __optwf_lin_dav_MOD_optwf_lin_d
	at /home/vikko/local_projects/champ/src/vmc/optwf_lin_dav.f:117
#8  0x55e4301e620e in __optwf_mod_MOD_optwf
	at /home/vikko/local_projects/champ/src/vmc/optwf.f90:31
#9  0x55e4301e3b6a in MAIN__
	at /home/vikko/local_projects/champ/src/vmc/main.f90:62
#10  0x55e43017b749 in main
	at /home/vikko/local_projects/champ/src/vmc/main.f90:16
@v1kko
Copy link
Collaborator Author

v1kko commented Feb 13, 2023

@NicoRenaud , @neelravi , for your reference, an old issue I created last year

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant