Skip to main content

[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'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


Wyatt Spear <wspear@xxxxxxxxxxxxxx>
Sent by: ptp-dev-bounces@xxxxxxxxxxx

04/24/2009 01:40 PM

Please respond to
Parallel Tools Platform general developers <ptp-dev@xxxxxxxxxxx>

To
Parallel Tools Platform general developers <ptp-dev@xxxxxxxxxxx>
cc
Subject
Re: [ptp-dev] Question about running additional commands in external         tools framework





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



Back to the top