Commit 812dcc50 authored by Alejandro Homs Puron's avatar Alejandro Homs Puron Committed by Alejandro Homs Puron
Browse files

[LIMA_LAUNCHER][LIMA2_TANGO] Add merged_executable option

* It is mandatory for single-process configurations
parent df9be9c9
......@@ -8,7 +8,8 @@
"lima2_tango": {
"plugin": "simulator",
"processing": "legacy",
"instance": "simulator_ahoms0"
"instance": "simulator_ahoms0",
"merged_executable": true
},
"environment": {
"*": {
......
......@@ -8,7 +8,8 @@
"lima2_tango": {
"plugin": "simulator",
"processing": "legacy",
"instance": "simulator_sam"
"instance": "simulator_sam",
"merged_executable": true
},
"environment": {
"*": {
......
......@@ -172,9 +172,12 @@ def lima2_get_executables(tango_config, args):
proc = tango_config.get('processing', '')
if not proc:
raise ValueError('Missing lima2_tango processing definition')
merged = f'lima2_{plugin}_{proc}'
ctrl = f'lima2_{plugin}_ctrl'
recv = f'lima2_{plugin}_{proc}_recv'
merged = tango_config.get('merged_executable', False)
if merged:
ctrl = recv = f'lima2_{plugin}_{proc}'
else:
ctrl = f'lima2_{plugin}_ctrl'
recv = f'lima2_{plugin}_{proc}_recv'
return dict(merged=merged, ctrl=ctrl, recv=recv)
......@@ -199,9 +202,8 @@ def launch_lima2_tango(config, args):
if remote_control or remote_recvs:
raise ValueError('Remote servers not supported yet')
mpi_cmds = [f'-n 1 {{ctrl}} {instance}'.format(**execs)]
if nb_recvs > 0:
mpi_cmds = [f'-n 1 {{ctrl}} {instance}'.format(**execs)]
def get_recv_cmd(recv_config):
nb_recvs = recv_config.get('nb_receivers', 1)
numa_cmd = ''
......@@ -213,8 +215,8 @@ def launch_lima2_tango(config, args):
return f.format(**execs)
mpi_cmds += [get_recv_cmd(c) for c in recvs_config]
else:
mpi_cmds = [f'-n 1 {{merged}} {instance}'.format(**execs)]
elif not execs['merged']:
raise ValueError('Single-processr config requires merged_executable')
environ_config = config.get('environment', {})
with Environment(environ_config, args=args) as env:
......
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