Ah, if only it were that simple!

Unfortunately, we need the xml stuff totally separated from anything else that might come out via stdout or stderr. That's the problem Greg and I are trying to solve.

The -xml-file option appears to be the only solution at the moment.

Thanks for the thought, though...

On Sep 1, 2009, at 11:43 AM, Neil Ludban wrote:

Date: Mon, 31 Aug 2009 20:26:20 -0500
From: Greg Watson <g.wat...@computer.org>
Subject: Re: [OMPI devel] XML request
To: Open MPI Developers <de...@open-mpi.org>
Message-ID: <7c3bd80b-2e0d-4188-ba0a-9b4963ae2...@computer.org>
Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes

Hey Ralph,

Unfortunately I don't think this is going to work for us. Most of the
time we're starting the mpirun command using the ssh exec or shell
service, neither of which provide any mechanism for reading from file
descriptors other than 1 or 2. The only alternatives I see are:

1. Provide a separate command that starts mpirun at the end of a pipe
that is connected to the fd passed using the -xml-fd argument. This
command would need to be part of the OMPI distribution, because the
whole purpose of the XML was to provide an out-of-the-box experience
when using PTP with OMPI.

2. Implement an -xml-file option, but I could write the code for you.

3. Go back to limiting XML output to the map only.

None of these are particularly ideal. If you can think of anything
else, let me know.

I don't think there's a nicer way to do this:

if (xml_output) {
  FILE *fxml = fopen("/dev/stdout", "w");
  freopen("/dev/stderr", "w", stdout);
}

You could also replace file descriptors 1 and 2 with pipes and
read data back in, convert to XML, and send it on to the dup'd
fd 1.  But this would cause problems if there were any debug
printfs that were timing sensitive.
_______________________________________________
devel mailing list
de...@open-mpi.org
http://www.open-mpi.org/mailman/listinfo.cgi/devel

Reply via email to