Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

Subject: Re: [OMPI users] Handling output of processes
From: Ralph Castain (rhc_at_[hidden])
Date: 2009-01-22 12:32:48


Hmmm....it works fine for me. Note that orte-iof must be executed from
the same node as mpirun. Also, ensure that rank=0 is actually the MPI
rank that is printing something! Otherwise, nothing will come out.

It should also be noted that it does take time for you to execute orte-
iof, and that orte-iof will not capture any output that precedes its
connection with mpirun. Thus, if the output comes out before orte-iof
sets up the connection to mpirun, that output will not show up on orte-
iof's screen.

Just as an FYI: you can have mpirun tell you its pid automatically
with --report-pid so you don't have to do a ps to find it.

If you want to write your own, you will need to configure your build --
with-devel-headers. Your program will then need to have the same list
of includes as shown in that example code.

Ralph

On Jan 22, 2009, at 7:26 AM, jody wrote:

> Hi
> I downloaded 1.3 the day its release was announced :)
>
> I now wanted to try it, so i pieced it together from orte-iof --help:
> - started an mpirun with 4 process
> - opened a new terminal
> - did ps to find the mpirun's pid
> - then: orte-iof --pid 8449 --rank 0 --stdout
> but nothing happens...
> So did i misunderstand its usage?
>
> I quickly glanced at the code - i guess
> orte_iof.pull(&target_proc, stream, 1)
> is the heart of the matter. But i was unable to fnd where this
> orte-iof struct fas actually defined. COUld you give me a hint?
>
> Thanks
> Jody
>
> On Thu, Jan 22, 2009 at 2:33 PM, Ralph Castain <rhc_at_[hidden]> wrote:
>> If you are willing/able to upgrade to 1.3, you will find a new
>> utility
>> called "ompi-iof" (or "orte-iof") that allows you to capture the
>> output
>> from any specified rank or combination of ranks. Note that the
>> output is
>> copied to the tool, so it will also still arrive at the output of
>> mpirun.
>>
>> If you want to build your own version of that utility, you can use
>> this tool
>> as an example of how to do it - the source is at orte/tools/orte-
>> iof. Feel
>> free to ask questions.
>>
>> If you need to do this with a prior release....well, I'm afraid it
>> won't
>> work. :-)
>>
>> Ralph
>>
>> On Jan 22, 2009, at 1:58 AM, jody wrote:
>>
>>> Hi
>>> I have a small cluster consisting of 9 computers (8x2 CPUs, 1x4
>>> CPUs).
>>> I would like to be able to observe the output of the processes
>>> separately during an mpirun.
>>>
>>> What i currently do is to apply the mpirun to a shell script which
>>> opens a xterm for each process,
>>> which then starts the actual application.
>>>
>>> This works, but is a bit complicated, e.g. finding the window you're
>>> interested in among 19 others.
>>>
>>> So i was wondering is there a possibility to capture the processes'
>>> outputs separately, so
>>> i can make an application in which i can switch between the
>>> different
>>> processor outputs?
>>> I could imagine that could be done by wrapper applications which
>>> redirect the output over a TCP
>>> socket to a server application.
>>>
>>> But perhaps there is an easier way, or something like this alread
>>> does
>>> exist?
>>>
>>> Thank You
>>> Jody
>>> _______________________________________________
>>> users mailing list
>>> users_at_[hidden]
>>> http://www.open-mpi.org/mailman/listinfo.cgi/users
>>
>> _______________________________________________
>> users mailing list
>> users_at_[hidden]
>> http://www.open-mpi.org/mailman/listinfo.cgi/users
>>
> _______________________________________________
> users mailing list
> users_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/users