Opened 6 years ago

Last modified 6 years ago

#998 new defect

The --define option does not work

Reported by: alibeck Owned by: Erik Schnetter
Priority: major Milestone:
Component: SimFactory Version:
Keywords: Cc:


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

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.

Attachments (0)

Change History (4)

comment:1 Changed 6 years ago by Ian Hinder

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.

comment:2 Changed 6 years ago by alibeck

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


comment:3 Changed 6 years ago by alibeck

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

# 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.


comment:4 Changed 6 years ago by Erik Schnetter

Component: OtherSimFactory
Owner: set to Erik Schnetter

Modify Ticket

Change Properties
Set your email in Preferences
as new The owner will remain Erik Schnetter.
Next status will be 'review'.
as The resolution will be set.
to The owner will be changed from Erik Schnetter to the specified user.
Next status will be 'confirmed'.
The owner will be changed from Erik Schnetter to anonymous.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.