Skip to content

Commit

Permalink
Merge Pull Request #11330 from e10harvey/Trilinos/TRILFRAME-486
Browse files Browse the repository at this point in the history
Automatically Merged using Trilinos Pull Request AutoTester
PR Title: packages/framework:
PR Author: e10harvey
  • Loading branch information
trilinos-autotester authored Dec 7, 2022
2 parents e6ef096 + 2105b11 commit 27ef56d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 31 deletions.
5 changes: 4 additions & 1 deletion packages/framework/ini-files/config-specs.ini
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,9 @@
#------------------------------------------------------------------------------

[COMMON]
opt-set-cmake-var CMAKE_GENERATOR STRING : Ninja
#opt-set-cmake-var Trilinos_ENABLE_BUILD_STATS BOOL : ON

# LINK_JOBS_LIMIT only has an affect when CMAKE_GENERATOR=Ninja, default to 2
opt-set-cmake-var Trilinos_PARALLEL_LINK_JOBS_LIMIT STRING : 2

Expand Down Expand Up @@ -862,7 +865,7 @@ opt-set-cmake-var Trilinos_ENABLE_Zoltan2Core BOOL : ON

[NODE-TYPE|CUDA_USE-RDC|YES_USE-PT|YES]
# LINK_JOBS_LIMIT only has an affect when CMAKE_GENERATOR=Ninja
opt-set-cmake-var Trilinos_PARALLEL_LINK_JOBS_LIMIT STRING FORCE : 10
opt-set-cmake-var Trilinos_PARALLEL_LINK_JOBS_LIMIT STRING FORCE : 32

[NODE-TYPE|CUDA_USE-RDC|YES_USE-PT|NO]
# LINK_JOBS_LIMIT only has an affect when CMAKE_GENERATOR=Ninja
Expand Down
19 changes: 6 additions & 13 deletions packages/framework/pr_tools/LaunchDriver.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,13 @@ def get_launch_env(build_name : str, system : str):
"""
Gets the launch environment based on the detected system.
This is an early environment that's required for running the driver.
Returns:
str: The environment used to launch the driver.
"""
env = ""
if "_rdc" in build_name:
env += " TRILINOS_MAX_CORES=10"

if system == "weaver" or system == "ats2":
env += " Trilinos_CTEST_DO_ALL_AT_ONCE=TRUE"
env += " TRILINOS_MAX_CORES=96"

if env == "":
return ""
Expand All @@ -49,25 +46,22 @@ def get_launch_env(build_name : str, system : str):
def get_launch_cmd(build_name : str, system : str):
"""
Gets the launch command based on the detected system.
Returns:
str: The command used to launch the driver.
"""
if system == "weaver" or system == "ats2":
cmd = "bsub -Is -J " + build_name + " -W 12:00"
else:
cmd = ""
cmd = ""

return cmd + " "


def get_driver_args(system : str):
"""
Gets the driver arguments based on the detected system.
Returns:
str: The arguments passed to the driver.
"""
"""
return " " + "--on_" + system


Expand Down Expand Up @@ -112,4 +106,3 @@ def main(argv):

if __name__ == "__main__":
main(sys.argv[1 :])

19 changes: 2 additions & 17 deletions packages/framework/pr_tools/unittests/test_LaunchDriver.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,34 +27,19 @@ def setUp(self):

## Test LaunchDriver methods
def testUnitGetLaunchEnv(self):
env = ld.get_launch_env(self.build_name, "weaver")
self.assertEqual(env, "env Trilinos_CTEST_DO_ALL_AT_ONCE=TRUE ")

env = ld.get_launch_env(self.build_name, "ats2")
self.assertEqual(env, "env Trilinos_CTEST_DO_ALL_AT_ONCE=TRUE ")

env = ld.get_launch_env(self.build_name+"_rdc", "weaver")
self.assertEqual(env, "env TRILINOS_MAX_CORES=10 Trilinos_CTEST_DO_ALL_AT_ONCE=TRUE ")
env = ld.get_launch_env(self.build_name+"_rdc", "dne")
self.assertEqual(env, "env TRILINOS_MAX_CORES=96 ")

env = ld.get_launch_env(self.build_name, "dne")
self.assertEqual(env, "")


def testUnitGetLaunchCmd(self):
cmd = ld.get_launch_cmd(self.build_name, "weaver")
self.assertEqual(cmd, "bsub -Is -J " + self.build_name + " -W 12:00 ")

cmd = ld.get_launch_cmd(self.build_name, "ats2")
self.assertEqual(cmd, "bsub -Is -J " + self.build_name + " -W 12:00 ")

cmd = ld.get_launch_cmd(self.build_name, "dne")
self.assertEqual(cmd, " ")


def testUnitGetDriverArgs(self):
args = ld.get_driver_args("ats2")
self.assertEqual(args, " --on_ats2")

args = ld.get_driver_args("dne1")
self.assertEqual(args, " --on_dne1")

Expand Down

0 comments on commit 27ef56d

Please sign in to comment.