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

Abort if multideterminant expansion is empty #5012

Merged
merged 3 commits into from
May 29, 2024

Conversation

prckent
Copy link
Contributor

@prckent prckent commented May 29, 2024

Proposed changes

Avoid a crash if the cutoff is too high and instead print a meaningful error message

What type(s) of changes does this code introduce?

  • Bugfix
  • New feature

Does this introduce a breaking change?

  • No

What systems has this change been tested on?

nitrogen2, gcc 13.2 nightly config

Checklist

  • Yes. This PR is up to date with current the current state of 'develop'
  • Yes. Code added or changed in the PR has been clang-formatted
  • No. This PR adds tests to cover any new code, or to catch a bug that is being fixed
  • NA. Documentation has been added (if appropriate)

@prckent prckent changed the title Add check multideterminant expansion is not empty Abort if multideterminant expansion is empty May 29, 2024
@@ -967,13 +967,18 @@ bool SlaterDetBuilder::readDetList(xmlNodePtr cur,
}

app_log() << "Found " << coeff.size() << " terms in the MSD expansion.\n";

if (coeff.size() == 0)
throw std::runtime_error(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is a uniform error and can be better handled. A lot of I/O fixes needed in this file. #5013

@ye-luo
Copy link
Contributor

ye-luo commented May 29, 2024

Test this please

@ye-luo ye-luo enabled auto-merge May 29, 2024 21:39
@ye-luo ye-luo merged commit d534bfa into QMCPACK:develop May 29, 2024
37 of 38 checks passed
@prckent prckent deleted the NodetsError branch September 19, 2024 21:44
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

Successfully merging this pull request may close these issues.

2 participants