The --define option does not work

Issue #998 resolved
anonymous created an issue

At a simfactory call it should be possible to define a value of a variable by setting


Them the variable @VAR@ in a run- or submitscript should be expanded to NEWVALUE.

Using define a shown above leads to the error:

[snip] error: --define option requires 2 arguments [snip]

So I have tried also


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.


Comments (6)

  1. Ian Hinder
    • removed 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.

  2. anonymous reporter
    • removed comment

    I am on it, and I think i have found a solution, so please wait a bit...


  3. anonymous 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 n the set function: disable the if condition

    1. if self.PresetMacros.has_key(define):

    2) in 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.


  4. Log in to comment