-
Notifications
You must be signed in to change notification settings - Fork 135
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
Improve dryrun capabilty #5003
Improve dryrun capabilty #5003
Conversation
src/QMCApp/QMCMain.cpp
Outdated
xmlNewProp(newmcptr, (const xmlChar*)"collected", (const xmlChar*)"yes"); | ||
//#else | ||
// xmlNewProp(newmcptr,(const xmlChar*)"collected",(const xmlChar*)"no"); | ||
//#endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also please remove the commented lines of code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
app_log() << " Debug is done. Skip the rest of the input " << std::endl; | ||
break; | ||
} | ||
app_log() << " dryrun == 1 : Skipping all QMC and loop elements " << std::endl; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about making an early return instead of keep a giant scope of 'else'.
I learned this from https://llvm.org/docs/CodingStandards.html#use-early-exits-and-continue-to-simplify-code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, it is a matter of style. I prefer the early exit but some people do not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If method is of sane size early exit should not present difficulty reading.
Test this please |
Proposed changes
dryrun will exit cleanly (zero error code) rather than QMCPACK aborting. Small edits to docs and comments.
What type(s) of changes does this code introduce?
Does this introduce a breaking change?
What systems has this change been tested on?
Ubuntu 22.04 gcc 11.4.0
Checklist