This bug occurs for reading from stdin in C too.

Again on an exodar schroot on sid:

CONTEXT:

$ dpkg -l |egrep "tree.*puzzle|openmpi|pmix|gfortran|gcc|mpifort|libc[-0]"
ii  gcc                                4:8.2.0-2                   hurd-i386    
GNU C compiler
ii  gcc-8                              8.2.0-14                    hurd-i386    
GNU C compiler
ii  gcc-8-base:hurd-i386               8.2.0-14                    hurd-i386    
GCC, the GNU Compiler Collection (base package)
ii  gfortran                           4:8.2.0-2                   hurd-i386    
GNU Fortran 95 compiler
ii  gfortran-8                         8.2.0-14                    hurd-i386    
GNU Fortran compiler
ii  gromacs-openmpi                    2018.4-1                    hurd-i386    
Molecular dynamics sim, binaries for OpenMPI parallelization
ii  libc-bin                           2.28-5                      hurd-i386    
GNU C Library: Binaries
ii  libc-dev-bin                       2.28-5                      hurd-i386    
GNU C Library: Development binaries
ii  libc-l10n                          2.28-5                      all          
GNU C Library: localization files
ii  libc0.3:hurd-i386                  2.28-5                      hurd-i386    
GNU C Library: Shared libraries
ii  libc0.3-dev:hurd-i386              2.28-5                      hurd-i386    
GNU C Library: Development Libraries and Header Files
ii  libgcc-8-dev:hurd-i386             8.2.0-14                    hurd-i386    
GCC support library (development files)
ii  libgcc1:hurd-i386                  1:8.2.0-14                  hurd-i386    
GCC support library
ii  libgfortran-8-dev:hurd-i386        8.2.0-14                    hurd-i386    
Runtime library for GNU Fortran applications (development files)
ii  libgfortran5:hurd-i386             8.2.0-14                    hurd-i386    
Runtime library for GNU Fortran applications
ii  libopenmpi-dev:hurd-i386           3.1.3-9                     hurd-i386    
high performance message passing library -- header files
ii  libopenmpi3:hurd-i386              3.1.3-9                     hurd-i386    
high performance message passing library -- shared library
ii  libpmix2:hurd-i386                 3.1.0~rc4-1                 hurd-i386    
Process Management Interface (Exascale) library
ii  openmpi-bin                        3.1.3-9                     hurd-i386    
high performance message passing library -- binaries
ii  openmpi-common                     3.1.3-9                     all          
high performance message passing library -- common files
ii  tree-puzzle                        5.2-11                      hurd-i386    
Reconstruction of phylogenetic trees by maximum likelihood
ii  tree-puzzle-doc                    5.2-11                      all          
Reconstruction of phylogenetic trees by maximum likelihood (doc)

$ mpicc --showme

gcc -I/usr/lib/i386-gnu/openmpi/include/openmpi 
-I/usr/lib/i386-gnu/openmpi/include -pthread -L/usr/lib/i386-gnu/openmpi/lib 
-lmpi



REPRODUCE THE BUG:

$ cat hurd_C_minimal.c
#include <stdio.h>
#include <strings.h>

int main(void){
  int i = 178;
  int j;
  printf("i = %d\n",i);
  scanf("%10d",&j);
  printf("j = %d\n",j);
  return 0;
}

$ cat infile
414

$ gcc hurd_C_minimal.c && time ./a.out < infile
i = 178
j = 414

real    0m0.010s
user    0m0.000s
sys     0m0.000s


$ mpicc src/hurd_C_minimal.c && (time mpirun -n 1 --mca plm_rsh_agent /bin/false 
./a.out < infile ) &
[2] 21871
i = 178

Runs for at least 30 seconds cpu time at about 10% cpu before I killed it.




REPRODUCE THE BUG - tree-puzzle:

This bug should affect all other openmpi packages which read from stdin,
such as tree-puzzle 5.2-11:

Again on an exodar schroot on sid:


(0) prepare 2-line input file:

$ cp -pv /usr/share/doc/tree-puzzle/examples/primates.b  .
$ printf "primates.b\ny\n" > infile.tree-puzzle


(1) without mpi

$ time tree-puzzle < infile.tree-puzzle > /dev/null && ls -lt out????
Using SPRNG -- Scalable Parallel Random Number Generator
WARNING from init_rng: Parameter not valid. Using Default param

real    0m0.020s
user    0m0.000s
sys     0m0.000s
-rw-r--r-- 1 boud-guest boud-guest  284 Jan 16 01:04 outdist
-rw-r--r-- 1 boud-guest boud-guest 7095 Jan 16 01:04 outfile
-rw-r--r-- 1 boud-guest boud-guest  130 Jan 16 01:04 outtree


(2) with mpi

$ (time mpirun -n 1 --mca plm_rsh_agent  /bin/false tree-puzzle < infile.tree-puzzle > 
/dev/null && ls -lt out????) &
[1] 13122
Using SPRNG -- Scalable Parallel Random Number Generator
WARNING from init_rng: Parameter not valid. Using Default param

Runs at about 10-20% of cpu for at least 80 seconds of cpu time.

Reply via email to