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

replace run_cmd with run_shell_cmd in custom easyblock for ATLAS (atlas.py) #3097

Closed
Closed
Changes from all 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
9 changes: 5 additions & 4 deletions easybuild/easyblocks/a/atlas.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
from easybuild.framework.easyconfig import CUSTOM
from easybuild.tools.build_log import EasyBuildError
from easybuild.tools.modules import get_software_root
from easybuild.tools.run import run_cmd
from easybuild.tools.run import run_shell_cmd
from easybuild.tools.systemtools import AMD, INTEL, get_cpu_speed, get_cpu_vendor, get_shared_lib_ext


Expand Down Expand Up @@ -142,9 +142,10 @@ def configure_step(self):
# call configure in parent dir
cmd = "%s %s/configure --prefix=%s %s" % (self.cfg['preconfigopts'], self.cfg['start_dir'],
self.installdir, self.cfg['configopts'])
(out, exitcode) = run_cmd(cmd, log_all=False, log_ok=False, simple=False)
res = run_shell_cmd(cmd, fail_on_error=False)

if exitcode != 0:
if res.code != 0:
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if res.code != 0:
if res.exit_code != 0:

Copy link
Member Author

Choose a reason for hiding this comment

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

easybuilders/easybuild-docs#240 for updating the documentation to avoid someone else making the same mistake I made here.

out = res.output
throttling_regexp = re.compile("cpu throttling [a-zA-Z]* enabled", re.IGNORECASE)
if throttling_regexp.search(out):
errormsg = (
Expand Down Expand Up @@ -175,7 +176,7 @@ def build_step(self, verbose=False):

self.log.debug("Building shared libraries")
cmd = "make shared cshared ptshared cptshared"
run_cmd(cmd, log_all=True, simple=True)
run_shell_cmd(cmd)

try:
os.chdir('..')
Expand Down
Loading