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

Bug 354001

Summary: Inconsistent processing of environment variables in PE JAXB RM
Product: [Tools] PTP Reporter: David Wootton <drwootton>
Component: RMAssignee: Albert L. Rossi <arossi>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: arossi
Version: 5.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description David Wootton CLA 2011-08-05 09:20:47 EDT
I'm having problems with handling of environment variables in my PE JAXB resource manager implementation. I have 9 dynamic tabs under the launch-tab, where each tab lists the titles of the remaining 8 tabs in the includeWidgetValuesFrom list.

Sometimes I have to submit the same run configuration twice, where the settings I entered in the first run do not take effect until I open the run configuration dialog and submit it a second time without changing anything. The second time, the values are passed correctly.

It also seem to matter which tabs I visit before clicking run. If I open the run configuration dialog and don't switch to any other of my 9 tabs then values from other tabs don't get picked up. 

I can see this by clicking the 'View Configuration' button in any of the dynamic tab pages. I can also see this by specifying the following script which does not require PE as the 'target application'

#!/bin/sh
env|grep MP

I can provide the XML file for my PE JAXB implementation by private email if needed.
Comment 1 Albert L. Rossi CLA 2011-08-05 09:33:20 EDT
Dave,

It seems to me that before determining exactly what might be wrong here, I need an exact sequence of actions which will reproduce this behavior.  I think I am going to need your PE xml as well at this point.

When you submit, the Apply action is disabled, no?  The second issue (other values not being picked up) was an issue I had to deal with at one point and thought I had fixed ... but there likely is still a problem there.

Al
Comment 2 Albert L. Rossi CLA 2011-08-08 12:50:20 EDT
(In reply to comment #1)
> Dave,
> 
> It seems to me that before determining exactly what might be wrong here, I need
> an exact sequence of actions which will reproduce this behavior.  I think I am
> going to need your PE xml as well at this point.
> 
> When you submit, the Apply action is disabled, no?  The second issue (other
> values not being picked up) was an issue I had to deal with at one point and
> thought I had fixed ... but there likely is still a problem there.
> 
> Al

I have managed to create a test definition which reproduces your error.  I'll look into it.

Al
Comment 3 David Wootton CLA 2011-08-09 19:36:54 EDT
These are the steps I followed to get the error
1) Create a shell script on the remote system containing the following
#!/bin/sh
env|grep MP
2) Create a brand new resource manager selecting my PE JAXB resource manager
3) Create a brand new run configuration specifying my PE JAXB resource manager as the resource manager
4) Accept the default settings in my resource manager tabs
5) Specify the shell script from step 1 as the target executable
6) Pick one of the tabs in the resource tab of my run configuration and click run. I note the set of environment variables echoed to the console
7) Repeat step 6 picking a different tab in the resource manager tab. The set of environment variables echoed to the console is different.

For example, if I pick the Nodes tab then I get
MP_WAIT_MODE=poll
MP_BULK_MIN_MSG_SIZE=153600
MP_POLLING_INTERVAL=400000
MP_COLLECTIVE_GROUPS=0
MP_CSS_INTERRUPT=no
MP_RC_MAX_QP=8156
MP_PROCS=1
MP_RC_USE_LMC=no
MP_IMM_SEND_BUFFERS=1
MP_USE_BULK_XFER=no

If I select the Miscellaneous tab I get
MP_HINTS_FILTERED=no
MP_WAIT_MODE=poll
MP_PULSE=600
MP_BULK_MIN_MSG_SIZE=153600
MP_POLLING_INTERVAL=400000
MP_THREAD_STACKSIZE=0
MP_COLLECTIVE_GROUPS=0
MP_TIMEOUT=150
MP_CSS_INTERRUPT=no
MP_IO_ERRLOG=no
MP_RC_MAX_QP=8156
MP_MSG_API=mpi
MP_DEVTYPE=false
MP_PROCS=1
MP_RC_USE_LMC=no
MP_IMM_SEND_BUFFERS=1
MP_USE_BULK_XFER=no
MP_EUILIBPATH=/opt/ibmhpc/pe1100/ppe.poe/lib

It seems like it's picking up some settings from the visible tab plus some set of settings from other tabs.

I'll send you an email with my XML file
Comment 4 David Wootton CLA 2011-08-22 20:38:20 EDT
I'm just checking to see if there has been any progress on this bug.
Comment 5 Albert L. Rossi CLA 2011-08-23 08:15:41 EDT
I hope to be able to begin looking at this today or tomorrow.
Comment 6 Albert L. Rossi CLA 2011-08-25 09:20:29 EDT
(In reply to comment #5)
> I hope to be able to begin looking at this today or tomorrow.

Dave,

I don't think I need your script, as I can reproduce this (or something similar) with a simple demo script.

It seems that after clicking run, the next time through the entire env is not initialized.

I'm on it, hope to find the problem soon.

al
Comment 7 Albert L. Rossi CLA 2011-08-26 08:05:55 EDT
The issue here was establishing the correct initial environment. The inclusion of a widget value in the environment depends on, among other things, its visibility; however, the visible property of a widget cannot be forced unless its ancestors are visible as well.  When a configuration is first created, none of the tabs have been rendered visible, so any shared values for the first tab are not going to be set until those other tabs are actually exposed.

The fix for this was to add an "initialized" property to the configuration itself; if this is false, then the visible property of the widgets is bypassed.  This is essentially equivalent to turning on visible for all widgets by default.

Dave, I believe your problem results from this inconsistency.  I think that if you physically tabbed through all the PE tabs, then repeated your example, you would see the results would have then been sane.

I will mark this problem provisionally resolved until further testing proves otherwise.
Comment 8 David Wootton CLA 2011-08-31 08:40:15 EDT
Al, I'm just back from vacation today and following up on this. Is this an update to PTP head and/or PTP 5.0 source, a patch, or do I need to do something to my XML source for my resource manager?
Comment 9 Albert L. Rossi CLA 2011-08-31 09:14:13 EDT
(In reply to comment #8)
> Al, I'm just back from vacation today and following up on this. Is this an
> update to PTP head and/or PTP 5.0 source, a patch, or do I need to do something
> to my XML source for my resource manager?

Both Head and 5_0 were updated.  No changes to the XML are necessary.

-Al