Commit fb8ef6f7 authored by Millian Poquet's avatar Millian Poquet
Browse files

[tools,tests] remote launch tested on its own

parent 17c7d0fe
......@@ -157,33 +157,31 @@ add_test(exec1_medium
-od /tmp/batsim_tools_tests/exec1/out/instance_examples/pfmedium
-wd ${CMAKE_SOURCE_DIR})
add_test(execN_mixed
add_test(execN
${CMAKE_SOURCE_DIR}/tools/experiments/execute_instances.py
${CMAKE_SOURCE_DIR}/tools/experiments/instances_examples/pyfiller_tiny_medium_mixed.yaml
-bod /tmp/batsim_tools_tests/execN
-bwd ${CMAKE_SOURCE_DIR})
add_test(execN_ssh1
add_test(execN_np2
${CMAKE_SOURCE_DIR}/tools/experiments/execute_instances.py
${CMAKE_SOURCE_DIR}/test/test_no_energy.yaml
-bwd ${CMAKE_SOURCE_DIR}
-bod /tmp/batsim_tools_tests/ssh1
--mpi_hostfile ${CMAKE_SOURCE_DIR}/test/mpi_hostfile_localhost
--nb_workers_per_host 1)
-bod /tmp/batsim_tools_tests/execN_np2
--nb_workers_per_host 2)
add_test(execN_ssh2
add_test(execN_np4
${CMAKE_SOURCE_DIR}/tools/experiments/execute_instances.py
${CMAKE_SOURCE_DIR}/test/test_no_energy.yaml
-bwd ${CMAKE_SOURCE_DIR}
-bod /tmp/batsim_tools_tests/ssh2
--mpi_hostfile ${CMAKE_SOURCE_DIR}/test/mpi_hostfile_localhost
--nb_workers_per_host 2)
-bod /tmp/batsim_tools_tests/execN_np4
--nb_workers_per_host 4)
add_test(execN_ssh4
add_test(execN_np4_remote
${CMAKE_SOURCE_DIR}/tools/experiments/execute_instances.py
${CMAKE_SOURCE_DIR}/test/test_no_energy.yaml
-bwd ${CMAKE_SOURCE_DIR}
-bod /tmp/batsim_tools_tests/ssh4
-bod /tmp/batsim_tools_tests/execN_np4_remote
--mpi_hostfile ${CMAKE_SOURCE_DIR}/test/mpi_hostfile_localhost
--nb_workers_per_host 4)
......
localhost
localhost
localhost
localhost
::1
::1
::1
::1
......@@ -260,9 +260,14 @@ async def instance_runner(data, hostname, local_rank):
host=hostname, rank=local_rank,
iid=instance_id, comb=comb))
# Remote launch via taktuk
rmt = """ssh {host} '{cmd}'""".format(host=hostname,
cmd=command)
# Preparing the launch
command = """ssh {host} '{command}'""".format(host=hostname,
command=command)
if hostname != 'localhost':
command = rmt
create_dir_if_not_exists('{base_output_dir}/instances/output/'.format(
base_output_dir=data.base_output_directory))
stdout_filename = '{out}/instances/output/{iid}.stdout'.format(
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment