Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |  

This web mail archive is frozen.

This page is part of a frozen web archive of this mailing list.

You can still navigate around this archive, but know that no new mails have been added to it since July of 2016.

Click here to be taken to the new web archives of this list; it includes all the mails that are in this frozen archive plus all new mails that have been sent to the list since it was migrated to the new archives.

Subject: Re: [OMPI users] SIGPIPE handling?
From: Ralph Castain (rhc_at_[hidden])
Date: 2010-11-24 20:36:43


What OMPI version are you talking about?

We already trap SIGPIPE, but ignore it at the request of others (not sure what version that was started). I believe a flag may exist to alter that behavior - could easily be added if not.

On Nov 24, 2010, at 5:08 PM, Jesse Ziser wrote:

> Hello,
>
> I've noticed that OpenMPI does not seem to detect when something downstream of it fails. Specifically, I think it does not handle SIGPIPE or pass it down to its young, but it still prints an error message every time it occurs.
>
> For example, running a command like this:
>
> mpirun -np 1 ./mpi-cat </dev/zero | dd bs=1 count=1 >/dev/null
>
> (where mpi-cat is just a simple program that initializes MPI and then copies its input to its output) hangs after the dd quits, and produces an eternity of repetitions of this error message:
>
> [[35845,0],0] reports a SIGPIPE error on fd 13
>
> I am unsure whether this is the intended behavior, but it certainly seems unfortunate from my persepective. Is there any way to make it exit nicely, preferably with a single error, whenever what it's trying to write to doesn't exist anymore? I think I could even submit a patch to make it quit on SIGPIPE, if it is agreed that that makes sense.
>
> Here's the source for my mpi-cat example:
>
> #include <stdio.h>
>
> #include <mpi.h>
>
> int main (int iArgC, char *apArgV [])
> {
> int iRank;
>
> MPI_Init (&iArgC, &apArgV);
>
> MPI_Comm_rank (MPI_COMM_WORLD, &iRank);
>
> if (iRank == 0)
> {
> while(1)
> if(putchar(getchar()) < 0)
> break;
> }
>
> MPI_Finalize ();
>
> return (0);
> }
>
>
> Thank you,
>
> Jesse Ziser
> Applied Research Laboratories:
> The University of Texas at Austin
> _______________________________________________
> users mailing list
> users_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/users