Skip to content

Commit

Permalink
Python3 compatibility changes for Frontera
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiolsilva committed Jun 10, 2023
1 parent e60e931 commit 6ad010b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions bbp/comps/bbp_status.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
"""
BSD 3-Clause License
Expand Down Expand Up @@ -64,16 +64,16 @@ class BBPStatus(object):
["GFORTRAN Version",
"cat $BBP_DIR/src/gfortran.version", False],
["NumPy Version",
"python -c 'from __future__ import print_function; import numpy; print(numpy.__version__);'",
"python3 -c 'from __future__ import print_function; import numpy; print(numpy.__version__);'",
False],
["SciPy Version",
"python -c 'from __future__ import print_function; import scipy; print(scipy.__version__);'",
"python3 -c 'from __future__ import print_function; import scipy; print(scipy.__version__);'",
False],
["Matplotlib Version",
"python -c 'from __future__ import print_function; import matplotlib; print(matplotlib.__version__);'",
"python3 -c 'from __future__ import print_function; import matplotlib; print(matplotlib.__version__);'",
False],
["PyProj Version",
"python -c 'from __future__ import print_function; import pyproj; print(pyproj.__version__);'",
"python3 -c 'from __future__ import print_function; import pyproj; print(pyproj.__version__);'",
False]]

# Leave some envrionment variables out, to avoid capturing too much
Expand Down
2 changes: 1 addition & 1 deletion bbp/comps/run_bbp.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
"""
BSD 3-Clause License
Expand Down
2 changes: 1 addition & 1 deletion bbp/utils/batch/bbp_discovery_validation.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
"""
BSD 3-Clause License
Expand Down
4 changes: 2 additions & 2 deletions bbp/utils/batch/run_parallel.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
"""
BSD 3-Clause License
Expand Down Expand Up @@ -90,7 +90,7 @@ def runMultiSSH(self, nodes, numcores, cmdlist):
if not "TMPDIR" in os.environ:
os.environ["TMPDIR"] = ("/tmp/%s" %
(os.environ["SLURM_JOB_ID"]))
cmd = "/usr/bin/ssh -o \"ServerAliveInterval 60\" %s \"/bin/sh -c \'TMPDIR=%s;SLURM_JOB_ID=%s;source %s;%s\'\"" % (node, os.environ["TMPDIR"], os.environ["SLURM_JOB_ID"], self.envscript, c)
cmd = "/usr/bin/ssh -o \"ServerAliveInterval 60\" %s \"/bin/bash -c \'TMPDIR=%s;SLURM_JOB_ID=%s;source %s;%s\'\"" % (node, os.environ["TMPDIR"], os.environ["SLURM_JOB_ID"], self.envscript, c)
print("Running on %s: %s" % (node, cmd))
proclist.append([subprocess.Popen(cmd,shell=True), node])
# Ensure unique simids
Expand Down

0 comments on commit 6ad010b

Please sign in to comment.