Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[ptp-dev] Re: Question about bug 292049

Jie,

You shouldn't change anything in org.eclipse.ptp.rm.core/ui. In fact, you shouldn't need to use AbstractToolRuntimeSystem at all. This is only used for resource managers like Open MPI and MPICH2. All the SLURM-specific code must reside in the slurm.core and slurm.ui plugins.

Add the code that I put in the bug to the existing SLURMResourceManager class in doCreateRuntimeSystem(). The SLURM attributes should be created in your SLURMRMLaunchConfigurationDynamicTab and returned via the getAttributes() method. These will be automatically passed to the submitJob method, and you will receive them in your SLURM proxy.

Greg


On Nov 2, 2009, at 7:34 AM, JiangJie wrote:

Hi Greg,

I'm revising the related source codes as required.
But there is one problem when I'm trying to create SLURMJobAttributes, instead of modifying JobAttributes.
When launching a job, the createjob() method in AbstractToolRuntimeSystem.java 
needs to copy JobAttributes from "attrMgr" to "jobAttrMgr". For SLURM rms job launch,
job attributes must inlcude "numofnodes" and "timeLimit" attributes. If these job attributes are
moved to SLURMJobAttributes.java, some build errors will occur with the createjob() method:

...

Integer jobNumNodes = attrMgr.getAttribute(SLURMJobAttributes.getJobNumberOfNodesAttributeDefinition()).getValue()); 
Integer jobTimeLimit = attrMgr.getAttribute(SLURMJobAttributes.getJobTimeLimitAttributeDefinition()).getValue()); 
....

jobAttrMgr.addAttribute(SLURMJobAttributes.getJobNumberOfNodesAttributesDefinition().create(jobNumNodes));
jobAttrMgr.addAttribute(SLURMJobAttributes.getJobTimeLimitAttribut! esDefinition().create(jobTimeLimit));
...

However, when I tried to import org.eclipse.ptp.rm.slurm.core package(which includes class SLURMJobAttributes) in AbstractToolRuntimeSystem.java, 
it says that "The import org.eclipse.ptp.rm.slurm cannot be resolved".

On the other hand, the "attrMgr" (which is initializied using launch configuration)  is ONLY processed in AbstractToolRuntimeSystem.java,
so it is not possible to add more attributes by the doCreateJob() method in SLURMResourceManager.java.

How to add SLURM specific job attributes when launching job if implementing SLURMJobAttributes.java, other than changing JobAttributes.java?

Regards,
Jie


Messenger保护盾2.0,更安全可靠的Messenger聊天! 现在就下载!


Back to the top