Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 331487 - Asymmetry in comma separation in Open MPI host list
Summary: Asymmetry in comma separation in Open MPI host list
Status: RESOLVED FIXED
Alias: None
Product: PTP
Classification: Tools
Component: RM.Open MPI (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Greg Watson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-30 19:35 EST by Greg Watson CLA
Modified: 2010-12-02 08:57 EST (History)
0 users

See Also:


Attachments
patch to fix assymetry (2.15 KB, patch)
2010-11-30 19:36 EST, Greg Watson CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.