JUBE
JUBE copied to clipboard
Scripting parameter: for + conditional
Hello
I am trying to define an experiment using JUBE, where I test a different amount of nodes:
<parameter name="nodes" type="int">1,2,4,8,16</parameter>
I would also like to test a different combination of processes and threads:
<parameter name="taskspernode" type="int">1,2,4,8,14,28,56,112</parameter>
This works properly. It also can be written as an scripting parameter:
<parameter name="taskspernode" mode="python">",".join([ str(i) for i in [1,2,4,8,14,28,56,112] ])</parameter>
But, I cannot use conditionals inside this loop. For instance, I would like to limit the total number of processes:
<parameter name="taskspernode" type="int" mode="python">",".join([ str(i) for i in [1,2,4,8,14,28,56,112] if $nodes*i<=768])</parameter>
I get an error message from jube:
not well-formed (invalid token): line 45, column 124