Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ptp-dev] Accessing parallel launch resource attributes

I extend the ParallelLaunchConfigurationDelegate and take the ILaunchConfiguration and ILaunch objects that are passed through.  The user has provided lists of launch parameters (currently environment variables, program arguments and number of processors) to permute.  For each permutation I create a new working copy of the launch configuration and swap out or append the current values with the newly generated ones.  Then I create a new ILaunch object using the new configuration.  The new configuration and launch objects are used to create a job object which will initate an actual launch in the standard way when it is run.  Each of these jobs, one per permutation, is put in a queue and every job in the queue is run once it has been populated.  The original launch configuration is not changed and the permuted configurations are removed after they are used.

It all works pretty smoothly, but I need access to the correct attribute names to swap out the values in the launch configuration.  One possibility might be an extension point or an interface that provides the attribute names for resource manager attributes.  So every RM would have an implementation of 'IResourceConfigurationAttributes' and the fields there would have names consistent between RM's for the different parameter strings.

Then I could get the IResourceConfigurationAttributes object for the current RM and know that its .mpiProcs field would give me the right string to access the configuration parameter, or null if mpi processes weren't defined for this RM.

RMs that have their own unique parameters that don't overlap with others at all might be a problem in making this a general solution, though.

Thanks,
Wyatt

On Tue, Dec 9, 2008 at 7:29 AM, Greg Watson <g.watson@xxxxxxxxxxxx> wrote:
Wyatt,

Can you describe your required interaction with the PTP launcher in more detail? I'm wondering if we need an extension point to support this better.

Greg


On Dec 8, 2008, at 12:29 PM, Wyatt Spear wrote:

If there were some sort of guideline for RM attribute naming it might help.  For example, if I could be confident that any RM that supported processor count would have an attribute ending in .numProcs to key for that value.  Outside of that, for the time being, I may need to just root through the resource managers we have and hard-code the attributes in my plugin.

The main reason I need this information is to support parametric analyses.  I need to be able to take a single launch configuration and ILaunch object and generate a few permutations of it to be launched in sequence.  Right now from RM attributes I am only using the number of processors, but other launch attributes could easily become relevant.

-Wyatt

On Mon, Dec 8, 2008 at 8:36 AM, Greg Watson <g.watson@xxxxxxxxxxxx> wrote:
Hi Wyatt,

The attributes are roughly divided into RM-specific and non RM-specific. The latter are defined in org.eclipse.ptp.core.IPTPLaunchConfigurationConstants and these correspond to the Application, Arguments, Synchronize, and Debugger tabs. The former are defined in the RM plugin and correspond to the Resources tab. I say "roughly" because there may be some non RM-specific attributes that are no longer used, but haven't been cleaned out yet.

Unfortunately, number of processes falls into the RM-specific attributes, since not all systems may require this. I'm not quite sure about the best way to deal with it though. One way would be to provide a global number of processes attribute that all RM's use, and which defaults to 1 in the case of RM's that don't need it. But this doesn't address the issue of other RM-specific attributes that you might need access to (are there any?) A more generic solution would be to query the RM for the attributes, but this would still require some knowledge of the attributes you were expecting. The debugger actually queries the internal model to find out the number of processes for a job, but this only provides the information after the job has started, so is no use if you need it before then.

I don't know what the best solution is. Suggestions appreciated.

Greg


On Dec 5, 2008, at 7:17 PM, Wyatt Spear wrote:

Greetings,

I need to retrieve and alter parallel launch parameters programatically to support some of the external tools framework's capabilities.  I have access to the LaunchConfiguration and the ILaunch object provided by the PTP's launch configuration delegate but I am having trouble tracking down the configuration attribute names for things like the number of processes to be run.  I haven't dug deep enough to be sure but it looks like there are now different attribute names for these parameters depending on which resource manager is used.  Does anyone know how I can recover these values from within Eclipse?

Thanks,
Wyatt Spear
_______________________________________________
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



Back to the top