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

m_ritz_val[nev_new] with nev_new=m_ncv #14

Closed
jdbancal opened this issue Nov 12, 2016 · 4 comments
Closed

m_ritz_val[nev_new] with nev_new=m_ncv #14

jdbancal opened this issue Nov 12, 2016 · 4 comments

Comments

@jdbancal
Copy link
Contributor

Hey @yixuan,

Me again ;-) I have some trouble with GenEigsSolver : the method nev_adjusted sometimes tries to access m_ritz_val[nev_new] with a value of nev_new which is larger than the size of the array, thus resulting in a fatal error.

From what I can see, the m_ritz_val vector contains m_ncv elements. At the same time, in the beginning of function nev_adjusted it looks like nev_new can take values up to m_ncv (first value m_nev, and then potentially increase up to m_ncv in the loop). When this happens, m_ritz_val[nev_new] leads to a segmentation fault...

The occurence of this behavior seems to be linked with the decrease of the value of nconv between two iterations. At least both things happen jointly. Is the algorithm safe if nconv decreases for some iterations (I guess only momentarily...)? Is it normal to allow for nev_new to take values up to m_ncv?

Cheers!

@yixuan
Copy link
Owner

yixuan commented Nov 12, 2016

If you encountered such situations then this should be a bug. Let me take a look.

@yixuan
Copy link
Owner

yixuan commented Nov 13, 2016

Hi @jdbancal, I think this bug has been fixed. Would you like to have a try of the most recent version?

@jdbancal
Copy link
Contributor Author

Hey @yixuan, I tested the code which was giving a problem on the previous version of the library, and it works fine now :-) It looks like you fixed the problem. Thanks!

@yixuan
Copy link
Owner

yixuan commented Nov 14, 2016

Great! I think we can close this issue now.

@yixuan yixuan closed this as completed Nov 14, 2016
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

2 participants