[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [ptp-dev] Question about running additional commands in external tools framework
|
I just did a CVS commit that should address this issue. Replace your opening tool tag with one like:
<tool name="Test Tool" explicitexecution="true">
The explicitexecution attribute tells the ETFw not to automatically introduce an execution step unless one is explicitly called for in the workflow. By default it will execute the application after a build step or as the first launch step, which was resulting in the extra execution step you saw.
-Wyatt
On Fri, May 8, 2009 at 7:32 AM, Dave Wootton
<dwootton@xxxxxxxxxx> wrote:
Wyatt
I'm just getting back to looking at
why my application runs twice when invoked from the profiling launch dialog.
Unfortunately, I don't have a way to test running locally. For some reason
my Linux Eclipse keeps crashing on me.
This seems to have something to do with
coding two <analyze> sections in my tf.xml file. If I have just one,
then the application runs once.
The following is the structure of my
tf.xml file.
<?xml version="1.0"
encoding="UTF-8"?>
<toolset.01>
<tool name="Test Tool">
<analyze>
<utility command="PreStep" group="internal"/>
</analyze>
<execute>
<global name="Test Tool">
<optionpane title="Panel1">
<togoption label="Test Label:"
optname="ENV_VAR"
envvar="true"
required="true"
tooltip="Help
text goes here">
<optvalue
type="text" fieldrequired="true"/>
</togoption>
</optionpane>
<optionpane
title="Panel2">
</optionpane>
<optionpane
title="Panel3">
</optionpane>
</global>
</execute>
<analyze>
<utility command="PostStep" group="internal"/>
</analyze>
</tool>
</toolset.01>
Dave
04/28/2009 12:58 PM |
To
| Parallel Tools Platform general developers
<ptp-dev@xxxxxxxxxxx>
|
cc
|
|
Subject
| Re: [ptp-dev] Question about running
additional commands in external tools
framework |
|
I'm not very familiar with the resource manager system,
so I'm not sure how to pull out the host information you need there.
I'll keep working on remote support for the ETF elements and hopefully
those will make the issue moot, you'll just specify 'touch' and it will
run on the remote machine.
Off the top of my head I'm not sure what could make it run twice if there
is only one execute section specified. Does this happen if you use
a local, non-parallel launch (say, a hello-world test) with the same workflow?
Thanks,
Wyatt
On Mon, Apr 27, 2009 at 6:49 PM, Dave Wootton <dwootton@xxxxxxxxxx>
wrote:
Wyatt
I tried coding another analysis step as you described and it seems to get
control at the right point in time. I'm not sure how I get the host that
I run the command on though. If I look at the attributes in the ILaunchConfiguration
obejct my method is passed. I don't see a remote host name in there. The
closest I see is the attribute for a resource manager id. I can find the
resource manager by starting with the array of resource managers obtained
bt referencing the PTPCorePlugin object, but I don't know how I get from
resource manager to the hostname of the connection for the remote connection.
I'm also not sure how I make this work in the case of a serial application
where I don't think I have a resource manager to deal with.
The other thing that's happening now, and may have been happening all along,
is that I see my parallel application running twice when I run the performance
configuration. I'm guessing once because of the application tab in the
performance configuration and then again for something in your extension.
Any idea what might be happening?
Dave
The behavior of utility commands in an execution step is different from
the analysis step. In the execution step they are supposed to compose
with the application being run. This is to support tools like valgrind
where you actually run valgrind and give it your own executable as an argument.
This means that your setup should have sent a command like
/bin/touch /tmp/plugin <your_executable>
...to the remote machine which is still not what you want. But it
sounds like the framework didn't make it that far. The system does
some error checking which includes making sure the path exists on the local
system, which I will need to remove to support remote functionality.
This same error checking currently looks at the whole string for the utility
command to see if it is a valid file. If you put /tmp/plugin as an
<argument value="/tmp/plugin"> to the utility, so the command
string is just the executable it will get around that. But this still
doesn't address your goal.
Right now the best way to run an arbitrary application is with the <analyze>
tag. I need to enable remote support for you to be able to invoke
remote applications with simple xml, but as a temporary measure you could
specify another internal analysis step with AbstractPerformanceDataManager
that uses the remote API to invoke 'touch'. You would need to put
that analysis tag before your execute tag so it might bug you for the execute
directory as you saw before. I'll add an attribute to tell it that
it doesn't need to do that. And I'll try to implement some basic
support for remote tool invocation so that kind of effort won't be necessary.
Another possibility would be to use two execute commands in a row.
The second is your regular command. The first is just:
<execute>
<utility command="touch"/>
</execute>
This will touch (not launch) the executable itself so you can check its
time stamp. ...except, it will use whatever run job parameters you
have already set up with your remote resource, which might not be appropriate.
-Wyatt
On Fri, Apr 24, 2009 at 6:45 AM, Dave Wootton <dwootton@xxxxxxxxxx>
wrote:
Wyatt
I'm wondering if there's a way to run additional commands prior to running
my application using the performance configuration dialog and your
framework.
I tried putting
<utility command="/bin/touch /tmp/plugin"> statement in
my XML file
thinking that would run the touch command on the remote system. I ended
up
getting a popup telling me the '\/bin/touch /tmp/plugin' tool wasn't found
so I'm guessing this was run on my local system and failed.
Is there a way I can run a remote command before running my application
using your framework that doesn't require the user to do anything? Is
there something I can code in the XML file to do this?
If not, I'll have to think about a different way to solve this since I
think this is very specific to my plugin. I'm trying to touch a file to
use as a timestamp so I can find files created later than the date of the
file I touched. I can't rely on time o the local system since clocks may
be out of sync.
Dave
_______________________________________________
ptp-dev mailing list
ptp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ptp-dev
_______________________________________________
ptp-dev mailing list
ptp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ptp-dev
_______________________________________________
ptp-dev mailing list
ptp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ptp-dev
_______________________________________________
ptp-dev mailing list
ptp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ptp-dev
_______________________________________________
ptp-dev mailing list
ptp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ptp-dev