Skip to content

Commit

Permalink
Merge pull request #282 from cms21/main
Browse files Browse the repository at this point in the history
modified polaris app_run
  • Loading branch information
tomuram authored Nov 11, 2022
2 parents 871bcea + 505cd32 commit 4ae3284
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
4 changes: 4 additions & 0 deletions balsam/platform/app_run/app_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,10 @@ def start(self) -> None:
self._set_envs()
cmdline = self._build_preamble() + self._build_cmdline()
logger.info(f"{self.__class__.__name__} Popen: {cmdline}")
log_envs = ["OMP_NUM_THREADS", "OMP_PLACES"]
for k in log_envs:
if k in self._envs.keys():
logger.info(f"{self.__class__.__name__} envs: {k}={self._envs[k]}")
self._outfile = self._open_outfile()
self._pre_popen()

Expand Down
9 changes: 4 additions & 5 deletions balsam/platform/app_run/polaris.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class PolarisRun(SubprocessAppRun):

def _build_cmdline(self) -> str:
node_ids = [h for h in self._node_spec.hostnames]
# env_args = ",".join(self._envs.keys())
cpu_bind = self._launch_params.get("cpu_bind", "none")
nid_str = ",".join(map(str, node_ids))
args = [
"mpiexec",
Expand All @@ -19,10 +19,9 @@ def _build_cmdline(self) -> str:
"--hosts",
nid_str,
"--cpu-bind",
"none",
# "--map-by",
# f"ppr:{self._ranks_per_node}:node",
# "-envlist", env_args,
cpu_bind,
"-d",
self._threads_per_rank,
self._cmdline,
]
return " ".join(str(arg) for arg in args)

0 comments on commit 4ae3284

Please sign in to comment.