Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 352529

Summary: [JAXB] separate UI elements to submit an interactive PBS job and run the mpi application
Product: [Tools] PTP Reporter: levent <leventyilmaz>
Component: RMAssignee: Greg Watson <g.watson>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: arossi, beth, g.watson
Version: 5.0   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description levent CLA 2011-07-20 01:40:57 EDT
A conventional PBS Interactive session is:

1. Get to the queue interactively
2. Once in, do an initial setup (set environment variables, copy/stage input files, etc.)
3. Launch an MPI application, repeatedly as many times as required. 

It would be greatly useful to be able to define a Run Configuration where each of these steps can be specified separately; such that the Run Configuration then, once launched, would "establish the session", i.e. execute Steps 1 and 2. Then the users would be given the option to execute the Step 3 repeatedly.  (further improvement: allow for modifications of step-3, program arguments, etc., within the same session).  This last step may require a separate UI element. A nice idea by Greg (during the BoF 7/20/11, Salt Lake City)  was a right click context menu item on the Active Jobs list. 


This idea would be especially useful for a Debug Configuration where the MPI app would be launched repeatedly under the same interactive session. 


Thanks!!!
Comment 1 Albert L. Rossi CLA 2011-07-20 08:42:27 EDT
I don't see why this requires a separate UI.  All of what you are asking for is either currently possible or could be configured using the current API.

1 & 2.  are currently done together.  The one thing that needs to be added for interactive sessions is to pass the Environment Tab settings in a generic way to the command.  This is enabled for script-based submissions, but I neglected to put this in place for purely interactive jobs.  The environment would have to be added to the Process Builder rather than set in the script.

3.  You can currently do this, or you can modify the Launch Tab configuration to do this.  Essentially, when you submit a PBS interactive job, the resource requests apply to the initial PBS -I command.  Everything else is a redirect to stdin.  So if you change the application, the -np number, etc., and resubmit, it should happen.

NOTE:  this is not yet enabled for debug.  That is the one thing missing.  Enabling debug for PBS interactive will entail a slight modification of the underlying code in order to add a start-debugger command to execute just before the actual job.

Al
Comment 2 Greg Watson CLA 2011-07-21 12:11:26 EDT
Our experience from the workshop was that rerunning the job using the launch button is a bit non-intuitive. This is because the behavior of the launch button changes depending on the state of a job, something that doesn't normally happen in Eclipse. Instead, we were thinking that the launch button should always do the same thing, i.e. submit the job. For interactive jobs, once the job is in the running state, the setup and interactive portion of the job would be restarted using the job context menu. This roughly corresponds to the action a user would normally have to take to run an interactive job, and I think is more intuitive for the user.
Comment 3 Albert L. Rossi CLA 2011-07-21 12:32:38 EDT
(In reply to comment #2)
> Our experience from the workshop was that rerunning the job using the launch
> button is a bit non-intuitive. This is because the behavior of the launch
> button changes depending on the state of a job, something that doesn't normally
> happen in Eclipse. Instead, we were thinking that the launch button should
> always do the same thing, i.e. submit the job. For interactive jobs, once the
> job is in the running state, the setup and interactive portion of the job would
> be restarted using the job context menu. This roughly corresponds to the action
> a user would normally have to take to run an interactive job, and I think is
> more intuitive for the user.

If this is separate UI, it should be built the same way as the Launch Tab (configurable).  It would be in my opinion a good idea to try to reuse the code that exists, perhaps with a custom wizard which differs from the Launch Tab only in that its parent is not the Resources Tab.  You may want to modify the XSD to include an "interactive tab" attribute on the Launch Tab, though it is true this info can be obtained from how the launch commands are defined.  The Jobs View will also need to check to see if the configuration is interactive in order to activate the appropriate actions.
Comment 4 Albert L. Rossi CLA 2011-08-01 22:15:42 EDT
(In reply to comment #3)
> (In reply to comment #2)
> > Our experience from the workshop was that rerunning the job using the launch
> > button is a bit non-intuitive. This is because the behavior of the launch
> > button changes depending on the state of a job, something that doesn't normally
> > happen in Eclipse. Instead, we were thinking that the launch button should
> > always do the same thing, i.e. submit the job. For interactive jobs, once the
> > job is in the running state, the setup and interactive portion of the job would
> > be restarted using the job context menu. This roughly corresponds to the action
> > a user would normally have to take to run an interactive job, and I think is
> > more intuitive for the user.
> 
> If this is separate UI, it should be built the same way as the Launch Tab
> (configurable).  It would be in my opinion a good idea to try to reuse the code
> that exists, perhaps with a custom wizard which differs from the Launch Tab
> only in that its parent is not the Resources Tab.  You may want to modify the
> XSD to include an "interactive tab" attribute on the Launch Tab, though it is
> true this info can be obtained from how the launch commands are defined.  The
> Jobs View will also need to check to see if the configuration is interactive in
> order to activate the appropriate actions.

You also need to keep in mind that application, argument and environment come from Launch tabs as well.  You will need to access all of these, or at least the LaunchConfiguration, to make this work.
Comment 5 Beth Tibbitts CLA 2012-01-31 11:18:30 EST
fix typo in title JABX->JAXB
Comment 6 Greg Watson CLA 2013-02-12 22:03:37 EST
The new method will work as follows:

1. User submits batch-interactive job using run configuration/run button.
2. When job changes to RUNNING (from SUBMITTED), input will be sent to process.
3. When user wants to re-run the job (i.e. re-send the input), they will right-click on the running job, and choose "Re-run Job" from the context menu.
Comment 7 Greg Watson CLA 2013-02-12 22:14:03 EST
Initial changes committed to master. This provides a rerun() method that can be called to resend the input to the job. Still need to hook up UI to enable this functionality.
Comment 8 Greg Watson CLA 2013-02-15 10:15:38 EST
This work is now complete.