Sounds reasonable - I don’t have time to work thru it right now, but we can 
look at it once Jeff returns as he wrote all that stuff and might see where to 
make the changes more readily than me.

> On Apr 8, 2015, at 8:43 AM, Lev Givon <l...@columbia.edu> wrote:
> 
> Received from Ralph Castain on Wed, Apr 08, 2015 at 10:46:58AM EDT:
>> 
>>> On Apr 8, 2015, at 7:23 AM, Lev Givon <l...@columbia.edu> wrote:
>>> 
>>> The output of ompi_info --parsable is somewhat difficult to parse
>>> programmatically because it doesn't escape or quote fields that contain 
>>> colons,
>>> e.g.,
>>> 
>>> build:timestamp:Tue Dec 23 15:47:28 EST 2014
>>> option:threads:posix (MPI_THREAD_MULTIPLE: no, OPAL support: yes, OMPI 
>>> progress: no, ORTE progress: yes, Event lib: yes)
>>> 
>>> Is there some way to facilitate machine parsing of the output of ompi_info
>>> without having to special-case those options/parameters whose data fields 
>>> might
>>> contain colons ? If not, it would be nice to quote such fields in
>>> future releases of ompi_info.
>> 
>> I think the assumption was that people would parse this as follows:
>> 
>> * entry before the first colon is the category
>> 
>> * entry between first and second colons is the subcategory
>> 
>> * everything past the second colon is the value
> 
> Given that the "value" as defined above may still contain colons, it's still
> necessary to process it to extract the various data in it, e.g., the various 
> MCA
> parameters, their values, types, etc.
> 
>> You are right, however, that the current format precludes the use of an
>> automatic tokenizer looking for colon. I don't think quoting the value field
>> would really solve that problem - do you have any suggestions?
> 
> Why wouldn't quoting the value field address the parsing problem? Quoting a
> field that contains colons would effectively permit the output of ompi_info
> --parsable to be processed just like a CSV file; most CSV readers seem to
> support inclusion of the separator character in data fields via quoting.
> -- 
> Lev Givon
> Bionet Group | Neurokernel Project
> http://www.columbia.edu/~lev/
> http://lebedov.github.io/
> http://neurokernel.github.io/
> 
> _______________________________________________
> users mailing list
> us...@open-mpi.org
> Subscription: http://www.open-mpi.org/mailman/listinfo.cgi/users
> Link to this post: 
> http://www.open-mpi.org/community/lists/users/2015/04/26653.php

Reply via email to