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

update CP2K easyblock w.r.t. running regtest for CP2K v8.1 #2350

Merged
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 15 additions & 6 deletions easybuild/easyblocks/c/cp2k.py
Original file line number Diff line number Diff line change
Expand Up @@ -701,13 +701,20 @@ def test_step(self):
break

# location of do_regtest script
cfg_fn = "cp2k_regtest.cfg"
cfg_fn = 'cp2k_regtest.cfg'

regtest_script = os.path.join(self.cfg['start_dir'], 'tools', 'regtesting', 'do_regtest')
regtest_cmd = "%s -nosvn -nobuild -config %s" % (regtest_script, cfg_fn)
regtest_cmd = [regtest_script, '-nobuild', '-config', cfg_fn]
if LooseVersion(self.version) < LooseVersion('8.0'):
# -nosvn option was removed in CP2K 8.1
Copy link
Contributor

Choose a reason for hiding this comment

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

it was already removed in 7.1, but just shows a warning there, so should be fine

Copy link
Member Author

Choose a reason for hiding this comment

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

It was deprecated in 7.1, yeah, but that doesn't cause any actual trouble...

Should I change the version check to < 7.0?

Copy link
Contributor

Choose a reason for hiding this comment

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

you could, or you could change the comment to say '-nosvn is not allowed in CP2K 8.1' or something like that.
both are fine to me

Copy link
Member Author

Choose a reason for hiding this comment

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

fixed in 31f917b

regtest_cmd.insert(1, '-nosvn')

# older version of CP2K
if not os.path.exists(regtest_script):
regtest_script = os.path.join(self.cfg['start_dir'], 'tools', 'do_regtest')
regtest_cmd = "%s -nocvs -quick -nocompile -config %s" % (regtest_script, cfg_fn)
regtest_cmd = [regtest_script, '-nocvs', '-quick', '-nocompile', '-config', cfg_fn]

regtest_cmd = ' '.join(regtest_cmd)

# patch do_regtest so that reference output is used
if regtest_refdir:
Expand Down Expand Up @@ -812,9 +819,11 @@ def test_report(test_result):
self.postmsg += test_report("FAILED")
self.postmsg += test_report("WRONG")

# number of new tests, will be high if a non-suitable regtest reference was used
# will report error if count is positive (is that what we want?)
self.postmsg += test_report("NEW")
# there are no more 'new' tests from CP2K 8.1 onwards
if LooseVersion(self.version) < LooseVersion('8.0'):
# number of new tests, will be high if a non-suitable regtest reference was used
# will report error if count is positive (is that what we want?)
self.postmsg += test_report("NEW")

# number of correct tests: just report
test_report("CORRECT")
Expand Down