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

Throw an error for invalid l_max #41

Open
elindgren opened this issue Oct 23, 2024 · 2 comments
Open

Throw an error for invalid l_max #41

elindgren opened this issue Oct 23, 2024 · 2 comments

Comments

@elindgren
Copy link
Collaborator

NEP_CPU should throw an error when an invalid value for l_max is presented. For example, here in find_q:

if (L_max >= 8) {

Recently had an issue where by mistake an old version of NEP_CPU (only support l_max up to 4) was used with a new model with lmax>4. A check like this would have made it easier to catch the mistake earlier.

@brucefan1983
Copy link
Owner

We can do it for the current version, but cannot do it for older versions.

@elindgren
Copy link
Collaborator Author

...but cannot do it for older versions.

Yes of course 😅 My point was just that it could be helpful to have more sanity checks like this in the code.

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