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

Bug 331487

Summary: Asymmetry in comma separation in Open MPI host list
Product: [Tools] PTP Reporter: Greg Watson <g.watson>
Component: RM.Open MPIAssignee: Greg Watson <g.watson>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
patch to fix assymetry none

Description Greg Watson CLA 2010-11-30 19:35:34 EST
(First reported by Bob Fuhrer)

We noticed an asymmetry in the code in BasicOpenMpiRMLaunchConfigurationDynamicTab.DataSource; it seems that copyFromFields() translates commas in the host list to newlines, but the "dual" method (copyToFields()) doesn't reverse the transformation.

Moreover, a space-/newline-separated host list (as shown in the corresponding field in the launch configuration editor) causes an error at runtime, so a comma-separated list seems mandatory.

If one puts the commas in, and immediately launches, the launch proceeds as expected, but the next time one goes back into the launch config editor, the commas aren't restored.

If one doesn't launch, but simply puts the commas in the host list field, applies the changes, dismisses the launch config editor and goes right back in, the commas are gone.
Comment 1 Greg Watson CLA 2010-11-30 19:36:26 EST
I looked into the issue a bit more, and it's not at all clear to me why the code translated comma-separated lists into newline-separated ones.

If anything, a comma-separated list seems to be required for the launch to work properly, so the use of hostListToText() seems exactly backwards.

The following patch does the opposite of what the original code did, i.e., it turns a newline-separated list into a comma-separated one.

For me, at least, this works properly at runtime.
Comment 2 Greg Watson CLA 2010-11-30 19:36:51 EST
Created attachment 184204 [details]
patch to fix assymetry
Comment 3 Greg Watson CLA 2010-12-01 09:52:09 EST
Applied.
Comment 4 Greg Watson CLA 2010-12-01 10:37:01 EST
I've changed the patch so that the list is maintained as a newline separated list, but is converted to comma separated when it is added to the arguments.
Comment 5 Greg Watson CLA 2010-12-02 08:57:07 EST
Closing as fixed.