[mpich-discuss] stdin redirection
Filippone, Salvatore
Salvatore.Filippone at cranfield.ac.uk
Wed Jun 1 04:37:51 CDT 2016
Hello,
I have found something I do not understand with mpich 3.2.0. The
problem started with an application, but to demonstrate it I have
written a very simple-minded program which I am including here.
The program simply reads lines from standard input and reprints them
on standard output from a second process.
Now if I redirect stdin from a small(ish) file it works as expected:
======================================================================
[sfilippo at localhost MPI_cat]$ mpicc -v
mpicc for MPICH version 3.2
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/opt/gnu/5.3.0/libexec/gcc/x86_64-unknown-linux-
gnu/5.3.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-5.3.0/configure --prefix=/opt/gnu/5.3.0 --
enable-languages=c,c++,fortran --with-
gmp=/usr/local/travel/GCC/BUILDS/gmp --with-
mpfr=/usr/local/travel/GCC/BUILDS/mpfr --with-
mpc=/usr/local/travel/GCC/BUILDS/mpc --with-
isl=/usr/local/travel/GCC/BUILDS/isl
Thread model: posix
gcc version 5.3.0 (GCC)
[sfilippo at localhost MPI_cat]$ mpicc -o mpicat mpicat.c
[sfilippo at localhost MPI_cat]$ head mpicat.c | mpirun -np 2 ./mpicat
#include <stdlib.h>
#include <stdio.h>
#include "mpi.h"
#define LNSZ 129
#define TAGI 234
#define TAGC 567
int main(int argc, char *argv[] )
{
char linebuf[LNSZ];
int ierr, iam, np, itmp ;
[sfilippo at localhost MPI_cat]$
======================================================================
However if I use a long(ish) file (such as a configure script) I get
either no output or an error. On another machine with GNU 4.9.3 I
always get the silent failure.
======================================================================
[sfilippo at localhost MPI_cat]$ mpirun -np 2 ./mpicat < configure
[sfilippo at localhost MPI_cat]$ mpirun -np 2 ./mpicat < configure
[proxy:0:0 at localhost.localdomain] HYD_pmcd_pmip_control_cmd_cb
(../../../../mpich-3.2/src/pm/hydra/pm/pmiserv/pmip_cb.c:937): process
reading stdin too slowly; can't keep up
[proxy:0:0 at localhost.localdomain] HYDT_dmxu_poll_wait_for_event
(../../../../mpich-3.2/src/pm/hydra/tools/demux/demux_poll.c:76):
callback returned error status
[proxy:0:0 at localhost.localdomain] main (../../../../mpich-
3.2/src/pm/hydra/pm/pmiserv/pmip.c:206): demux engine error waiting for
event
[sfilippo at localhost MPI_cat]$
=======================================================================
Am I missing something?
Is this supposed to work? I could find nothing relevant in the FAQ
Thanks a lot
Salvatore
--
Salvatore Filippone, PhD
Centre for Computational Engineering Sciences,
School of Aerospace, Transport and Manufacturing, Bldg 52
Cranfield University
Cranfield
MK43 0AL
United Kingdom
tel: +44(0) 1234 758361
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mpicat.c
Type: text/x-csrc
Size: 1351 bytes
Desc: mpicat.c
URL: <http://lists.mpich.org/pipermail/discuss/attachments/20160601/1dcc94e8/attachment.bin>
-------------- next part --------------
_______________________________________________
discuss mailing list discuss at mpich.org
To manage subscription options or unsubscribe:
https://lists.mpich.org/mailman/listinfo/discuss
More information about the discuss
mailing list