[ET Trac] [Einstein Toolkit] #170: "environcmd" option is ignored for "execute"
Einstein Toolkit
trac-noreply at einsteintoolkit.org
Wed Jan 12 11:38:52 CST 2011
#170: "environcmd" option is ignored for "execute"
-------------------------+--------------------------------------------------
Reporter: eschnett | Owner: mthomas
Type: defect | Status: closed
Priority: major | Milestone:
Component: SimFactory | Version:
Resolution: fixed | Keywords:
-------------------------+--------------------------------------------------
Changes (by mthomas):
* status: new => closed
* resolution: => fixed
Comment:
sim execute calls simlib.ExecuteCommand. Inside of simlib.ExecuteCommand
is the following snippet of code:
{{{
environcmd = GetMachineOption('environcmd')
command = "{ %s; } && { %s; }" % (environcmd, command)
}}}
GetMachineOption first checks to see if environcmd was specified via the
--environcmd argument, and if not, it grabs it from the mdb entry for the
current machine.
In order to test this, I added this:
{{{
[varia]
user = mike
environcmd = echo this is my environcmd
}}}
The results of the following command
{{{
varia:simfactory mike$ bin/sim execute ls
}}}
Were:
Warning: could not resolve hostname varia
DEBUG: Simfactory command: bin/../lib/sim.py "execute" "ls"
DEBUG: Version 1110
The Simulation Factory: Manage Cactus simulations
Info: defs: /Users/mike/cactus/Cactus/simfactory/etc/defs.ini
Info: defs.local: /Users/mike/cactus/Cactus/simfactory/etc/defs.local.ini
Executing command: execute
Info: executing command: /bin/bash -c '{ echo this is my environcmd; } &&
{ ls; }'
this is my environcmd
README_FIRST.txt configs etc
mdb pysim.tmproj
bin doc lib
pysim.bbprojectd t.py
This clearly shows that environcmd was taken into account.
Lastly, I have renamed environcmd to envsetup throughout. This was a good
suggestion and is a bit more intuitive of a name. I don't know how to
execute this command once and have it sick, though. Any technical advice
in this area would be appreciated.
--
Ticket URL: <https://trac.einsteintoolkit.org/ticket/170#comment:1>
Einstein Toolkit <http://einsteintoolkit.org>
The Einstein Toolkit
More information about the Trac
mailing list