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

Segmentation fault when using Casino PP #1511

Closed
ye-luo opened this issue Mar 28, 2019 · 10 comments
Closed

Segmentation fault when using Casino PP #1511

ye-luo opened this issue Mar 28, 2019 · 10 comments
Assignees
Labels

Comments

@ye-luo
Copy link
Contributor

ye-luo commented Mar 28, 2019

It should be simple to fix.

@ye-luo ye-luo added the bug label Mar 28, 2019
@prckent
Copy link
Contributor

prckent commented Mar 28, 2019

Ugh. Any hints what is causing this? e.g. Andrea will have to use the AoS build or convert potentials until fixed.

@ye-luo
Copy link
Contributor Author

ye-luo commented Mar 28, 2019

I just tried the files from Andrea, SoA runs fine on my workstation. I need more clues for what is going on.

@prckent
Copy link
Contributor

prckent commented Mar 28, 2019

Crash on titan, summit?

@ye-luo
Copy link
Contributor Author

ye-luo commented Mar 28, 2019

It is on Titan. I'm asking Andrea to provide more info.

@ye-luo ye-luo changed the title SoA is giving segmentation fault when using Casino PP Segmentation fault when using Casino PP Mar 29, 2019
@ghost ghost assigned ye-luo Mar 29, 2019
@ghost ghost added the in progress label Mar 29, 2019
@zenandrea
Copy link
Contributor

@ye-luo @prckent
maybe not connected with the bug, but with the casino PP format:
in input I specify that I will use a casino PP in the following way

<pseudo elementType="C" format="casino" href="c_pp.data" lmax="2" l-local="2" nrule="4" cutoff="2.0" />

I wanted to point out that in the manual the attributes lmax, l-local, nrule, cutoff are mentioned but not really discussed. Although they can be guessed, I think it is worth to tell what nrule is.

Moreover, if it is not too complicated, maybe it could be introduced the possibility to define the cutoff radius not directly, via cutoff, but indirectly, using a new attribute that only defines what is the maximum deviation of the local or non-local potential from −Z/r at the cutoff radius (casino, for instance, works in this way, and has a default of 1e-5).

@ghost ghost removed the in progress label Mar 29, 2019
@ye-luo
Copy link
Contributor Author

ye-luo commented Mar 29, 2019

@zenandrea Indeed, the bug was exactly in the place where the cutoff is determined by scanning through the value of all the grid point. However, I think there is a numerical bug and the scanning stopped at the largest grid point because it already exceeds 1e-5 but it should not. I will take a closer look.

@zenandrea
Copy link
Contributor

@ye-luo
I had a look at where you corrected the code.
It seems to me that the code is not checking where local and non-local potentials deviates by more than the tolerance = 1.0e-5 from the −Z/r, but where the deviates from themselves.
I honestly do not understand how that can be useful.
Moreover, I do not understand what this rc_check ("Maxium cutoff for non-local pseudopotentials").
I mean, I provide the cutoff in input, thus I would be just interested to know what is the error, namely the difference with the asymptotic behavior (-Z/r, I guess).

@prckent
Copy link
Contributor

prckent commented Mar 29, 2019

@zenandrea I agree that the checks aren't helpful. They should also be independent of data source.

I think there are two radii of interest: when the local potential becomes purely Coulombic, -Z/r, and the radius when the non-local channels deviate from the local channel, necessitating the non-local integral be performed for electrons inside this radius.

@prckent
Copy link
Contributor

prckent commented Mar 29, 2019

We should discuss what is useful+wanted here and simply implement it.

@zenandrea
Copy link
Contributor

@prckent I totally agree with the two radii idea.
Indeed, I think a good solution could be to implement an automatic definition of the two radii that you described, for a tolerance that could be defined from input but has a reasonable default value of 1.0e-5. This would make the definition of cutoff useless (but maybe it could be kept for backward compatibility, with a warning that the tolerance value and the automatic definition of cutoffs is in that case ignored)

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

No branches or pull requests

3 participants