#1952: simfactory --substitute trys to modify a tuple ------------------------+--------------------------------------------------- Reporter: rhaas | Owner: Type: defect | Status: new Priority: major | Milestone: Component: SimFactory | Version: development version Keywords: | ------------------------+--------------------------------------------------- Trying to use the {{{--substitute}}} option to simfactory I get:
{{{ + simfactory/bin/sim submit --machine bluewaters --testsuite --walltime 4:0:0 --procs 8 --num-threads 4 --substitute SW_BLDDIR EinsteinToolkit/2016_05/cle5.2_gnu5.1.0/ET_2016_05 2016_05-swretest-16622-1471972677 Warning: Current Working directory does not match Cactus sourcetree, changing to /u/staff/rhaas/software /swtools-1.0/apps/linux/ET_2016_05 Traceback (most recent call last): File "simfactory/bin/../lib/sim.py", line 148, in <module> main() File "simfactory/bin/../lib/sim.py", line 144, in main CommandDispatch() File "simfactory/bin/../lib/sim.py", line 106, in CommandDispatch module.main() File "ET_2016_05/repos/simfactory2/lib/sim-manage.py", line 397, in main CommandDispatch() File "ET_2016_05/repos/simfactory2/lib/sim-manage.py", line 376, in CommandDispatch exec("command_%s()" % command) File "<string>", line 1, in <module> File "ET_2016_05/repos/simfactory2/lib/sim-manage.py", line 267, in command_submit restart.userSubmit(simulationName) File "ET_2016_05/repos/simfactory2/lib/simrestart.py", line 319, in userSubmit self.initRestart(simulationName) File "ET_2016_05/repos/simfactory2/lib/simrestart.py", line 255, in initRestart ret = self.load(simulationName) File "ET_2016_05/repos/simfactory2/lib/simrestart.py", line 88, in load self.BaseDir = simlib.GetBaseDir(machineEntry) File "ET_2016_05/repos/simfactory2/lib/simlib.py", line 250, in GetBaseDir basedir = DefineDatabase.SubAll(machineEntry.basedir) File "ET_2016_05/repos/simfactory2/lib/simsubs.py", line 230, in SubAll ss = self.PerformRegexSubstitutions(ss) File "ET_2016_05/repos/simfactory2/lib/simsubs.py", line 102, in PerformRegexSubstitutions rx_pair[1] = rx_pair[1].replace("@1@", r"\1") TypeError: 'tuple' object does not support item assignment }}}
#1952: simfactory --substitute trys to modify a tuple -------------------------+-------------------------------------------------- Reporter: rhaas | Owner: Type: defect | Status: new Priority: major | Milestone: Component: SimFactory | Version: development version Resolution: | Keywords: -------------------------+--------------------------------------------------
Comment (by eschnett):
Does it work if you use {{{replace}}} instead of {{{substitute}}}?
#1952: simfactory --substitute trys to modify a tuple -------------------------+-------------------------------------------------- Reporter: rhaas | Owner: Type: defect | Status: new Priority: major | Milestone: Component: SimFactory | Version: development version Resolution: | Keywords: -------------------------+--------------------------------------------------
Comment (by rhaas):
{{{--replace}}} does not fail, I am not sure if it does the right thing yet.
#1952: simfactory --substitute trys to modify a tuple -------------------------+-------------------------------------------------- Reporter: rhaas | Owner: Type: defect | Status: new Priority: major | Milestone: Component: SimFactory | Version: development version Resolution: | Keywords: -------------------------+--------------------------------------------------
Comment (by eschnett):
{{{replace}}} is for direct string substitution, {{{substitute}}} uses regular expressions.
#1952: simfactory --substitute trys to modify a tuple -------------------------+-------------------------------------------------- Reporter: rhaas | Owner: Type: defect | Status: new Priority: major | Milestone: Component: SimFactory | Version: development version Resolution: | Keywords: -------------------------+--------------------------------------------------
Comment (by rhaas):
I agree, {{{--subsitute}}} seems to still be broken though.
#1952: simfactory --substitute trys to modify a tuple -------------------------+-------------------------------------------------- Reporter: rhaas | Owner: Type: defect | Status: new Priority: major | Milestone: Component: SimFactory | Version: development version Resolution: | Keywords: -------------------------+--------------------------------------------------
Comment (by rhaas):
trac mail test. Please ignore the beautiful SPAM.
trac@lists.einsteintoolkit.org