Open MPI logo

Hardware Locality Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Hardware Locality Development mailing list

Subject: Re: [hwloc-devel] Something lighter-weight than XML?
From: Brice Goglin (Brice.Goglin_at_[hidden])
Date: 2011-09-04 12:59:33


JSON looks a bit more verbose than YAML, but JSON also looked better for
our hierarchical information, so I gave JSON a try. I just pushed the
result to the new json branch.

Notes:
* You can only load/save from/to a memory buffer (set_jsonbufffer and
export_jsonbuffer), but lstopo needed to load/save from/to a file, so I
could add the corresponding routines (set_json and export_json) to the
public interface to match what we have for XML
* We don't care about the validity of our JSON output, but some quick
tests seem to say that it's OK anyway
* I tried to handle most parsing errors, it should not crash during
parsing, but it may crash later after the discovery (e.g. if you get an
error within a child before finishing its parent). It's not clear that
it's worse than XML. Loading a bogus JSON or XML topology is a user
error anyway :)
* Distances needs rework (the same I did for XML recently). I didn't do
it because it would make backporting to <v1.3 harder (OMPI).
* Documentation is not updated until the API is finished

Brice