- removed comment
The --define option does not work
At a simfactory call it should be possible to define a value of a variable by setting
--define VAR=NEWVALUE
Them the variable @VAR@ in a run- or submitscript should be expanded to NEWVALUE.
Using define a shown above leads to the error:
[snip] sim.py: error: --define option requires 2 arguments [snip]
So I have tried also
--define VAR NEWVALUE
Using this --define in this way, the submission is successful, however @VAR@ is never evaluated by simfactory, so in the submit- and runscript @VAR@ instead of NEWVALUE can still be found.
Keyword:
Comments (6)
-
-
reporter - removed comment
I am on it, and I think i have found a solution, so please wait a bit...
Alexander
-
reporter - removed comment
A fix is available, and checked in into the trunk, because it requires further testing.
The following changes where required:
1) in simsubs.py n the set function: disable the if condition
- if self.PresetMacros.has_key(define):
2) in simrestart.py in the functions submit and run, added the dict DefineDatabase.PresetMacros to the dict new_properties.
Doing so, it is possible to add several --defines to a simfactory submit and / or run. However, because I am not sure about any side effects of the change in simsubs, I am checking in this changes only to the trunk branch right now.
Alexander
-
- assigned issue to
- changed component to SimFactory
- removed comment
-
Applied as git hash 4ba8f72 "Bugfix for Ticket
#998: "The --define option doesn't work" (corrected)" of simfactory2 (8 years ago). -
- edited description
- changed status to resolved
- Log in to comment
I believe that it works for parameter files but not for run scripts. Does it work for optionlists and submit scripts? I think the design should be that all these files are treated in the same way.