Skip to content

Commit

Permalink
updates to correct for gasnet on srun, removed amudprun support
Browse files Browse the repository at this point in the history
  • Loading branch information
ct-clmsn committed Feb 22, 2024
1 parent 8877fed commit b5694fc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 18 deletions.
2 changes: 1 addition & 1 deletion cmake/HPX_AddTest.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ function(add_hpx_test category name)
if(_add_test)
set(_full_name "${category}.distributed.gasnet.${name}")
add_test(NAME "${_full_name}" COMMAND ${cmd} "-p" "gasnet" "-r"
"amudprun" ${args}
"srun" ${args}
)
set_tests_properties(
"${_full_name}"
Expand Down
24 changes: 7 additions & 17 deletions cmake/templates/hpxrun.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -179,19 +179,6 @@ def run_none(cmd, localities, nodes, verbose):
print('Executing command: ' + ' '.join(cmd))
subproc(cmd)

def run_amudprun(cmd, localities, nodes, verbose):
assert len(nodes) == localities, "Number of localities must match number of nodes."
os.environ['GASNET_SPAWNFN'] = 'S'
os.environ['GASNET_SSH_SERVERS'] = ' '.join([ str(node) for node in nodes ])
os.environ['SSH_SERVERS'] = os.environ['GASNET_SSH_SERVERS']
os.environ['GASNET_ROUTE_OUTPUT'] = '0'

exec_cmd = ['amudprun', '-np', len(nodes), cmd]

if verbose:
print('Executing command: ' + ' '.join(exec_cmd))
subproc(exec_cmd)

# Run with mpiexec
# This is executing mpiexec with the "-np" option set to the number of localities
def run_mpi(cmd, localities, verbose):
Expand Down Expand Up @@ -228,8 +215,11 @@ def run_jsrun(cmd, localities, verbose):
def run(cmd, runwrapper, localities, nodes, verbose):
if runwrapper == 'none':
run_none(cmd, localities, nodes, verbose)
if runwrapper == 'amudprun':
run_amudprun(cmd, localities, nodes, verbose)
if runwrapper == 'gasnet':
assert nodes is None, "nodes option only valid with tcp parcelport."
os.environ['GASNET_SPAWNFN'] = 'C'
os.environ['GASNET_CSPAWN_CMD'] = ''
run_srun(cmd, localities, verbose)
if runwrapper == 'mpi':
assert nodes is None, "nodes option only valid with tcp parcelport."
run_mpi(cmd, localities, verbose)
Expand Down Expand Up @@ -298,7 +288,7 @@ def check_options(parser, options, args):
sys.exit(1)

check_valid_runwrapper = (lambda x:
x == 'none' or x == 'mpi' or x == 'srun' or x =='jsrun' or x == 'amudprun');
x == 'none' or x == 'mpi' or x == 'srun' or x =='jsrun');
if not check_valid_runwrapper(options.runwrapper):
print('Error: Runwrapper option not valid\n', sys.stderr)
parser.print_help()
Expand Down Expand Up @@ -383,7 +373,7 @@ Used by the tcp parcelport only.
parser.add_option('-r', '--runwrapper'
, action='store', type='string'
, dest='runwrapper', default=default_env('HPXRUN_RUNWRAPPER', 'none')
, help='Which runwrapper to use (Options are: none, mpi, amudprun, srun, jsrun) '
, help='Which runwrapper to use (Options are: none, mpi, srun, jsrun) '
'(environment variable HPXRUN_RUNWRAPPER)')

parser.add_option('-e', '--expected'
Expand Down

0 comments on commit b5694fc

Please sign in to comment.