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

Correct app_error usage #4686

Merged
merged 4 commits into from
Jul 25, 2023
Merged

Correct app_error usage #4686

merged 4 commits into from
Jul 25, 2023

Conversation

ye-luo
Copy link
Contributor

@ye-luo ye-luo commented Jul 25, 2023

Proposed changes

Address #4681 in a few places.

a) bug fix in Concurrency/ParallelExecutorOPENMP.hpp
b) clean up the MPC class
c) Remove dead ECPComponentBuilder::createVrWithData

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

  • Bugfix

Does this introduce a breaking change?

  • No

What systems has this change been tested on?

epyc-server

Checklist

  • Yes. This PR is up to date with current the current state of 'develop'

@ye-luo
Copy link
Contributor Author

ye-luo commented Jul 25, 2023

Test this please

@@ -327,9 +315,7 @@ void MPC::initBreakup()

std::unique_ptr<OperatorBase> MPC::makeClone(ParticleSet& qp, TrialWaveFunction& psi)
{
// return new MPC(qp, Ecut);
std::unique_ptr<MPC> newMPC = std::make_unique<MPC>(*this);
newMPC->resetTargetParticleSet(qp);
Copy link
Contributor

Choose a reason for hiding this comment

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

Why no longer needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The current implementation is no-op at line 33

resetTargetParticleSet(qp) {}

and resetTargetParticleSet should go away eventually.

Copy link
Contributor

@PDoakORNL PDoakORNL left a comment

Choose a reason for hiding this comment

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

Why not use UniformCommunicateError?

Copy link
Contributor

@PDoakORNL PDoakORNL left a comment

Choose a reason for hiding this comment

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

As far as using myComm instead of thinking about the scope of error handling I'm not a big fan. I think the right place to catch these sort of errors is at the scope matching a particular communicator. i.e.

qmcapp.cpp 209-:

    if (inputs.size() > 1)
      validInput = qmc->parse(inputs[qmcComm->getGroupID()]);
    else
      validInput = qmc->parse(inputs[0]);

    if (!validInput)
      qmcComm->barrier_and_abort("main(). Input invalid.");

    ...
    qmc.reset()

with

try
{

    if (inputs.size() > 1)
      qmc->parse(inputs[qmcComm->getGroupID()]);
    else
      qmc->parse(inputs[0]);
    ...
    qmc.reset()
}
catch(const UniformCommunicateError& uce)
{
      qmcComm->barrier_and_abort("main(). Input invalid.");

}

@PDoakORNL PDoakORNL merged commit 19c5834 into QMCPACK:develop Jul 25, 2023
23 checks passed
@prckent prckent mentioned this pull request Aug 18, 2023
@ye-luo ye-luo deleted the reduce-app_error branch October 31, 2023 01:39
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.

3 participants