Newsgroups: comp.parallel.mpi
From: delpino@igd.fhg.de (Alexander del Pino)
Subject: re: problems with MPI_Bcast in groups
Organization: Fraunhofer-IGD, Darmstadt, Germany
Date: Mon, 11 Dec 1995 11:28:35 MET
Message-ID: <1995Dec11.112836@donald>

// Can somebody help me by using the MPI_Broadcast in a group of prozessors?
// My program didn't terminate, because some prozessors waited for data, but
// they didn't get anything?
// Here is my program:
//
// #include "mpi.h"
// #include <math.h>
// int main(int argc,char *argv[]){
//   int size,rank,gsize,grank,value=0,ranks[]={1,2,3,4};
//      .
//      .
//      .
//
//   MPI_Finalize();
// }

Indeed, if I compile that program and let it run, it seems to go wrong:

======================================
Prozess -32766/0: is active.
Prozess 2/3: is active.
Prozess 0/1: is active.
Prozess 1/2: is active.
Prozess 1/2: got 5.
p1_23410:  p4_error: Found a dead connection while looking for messages: 3
rm_l_0_23411:  p4_error: interrupt SIGINT: 2
p3_8811:  p4_error: interrupt SIGSEGV: 11
rm_l_-143395204_8812:  p4_error: interrupt SIGINT: 2
======================================

IMHO, there is a problem with the rank numbering of the new group. If you
chose the numbering to begin from zero istead of one it works. (BTW, I let
that program run on a Sun workstation cluster with MPICH 1.0.11).

  int size,rank,gsize,grank,value=0,ranks[]={0, 1,2,3};
                                             ^^^^^^^^
                                             note: range = {0,...,3} !!!


yields the following result:

======================================
Prozess 0/0: is active.
Prozess 0/0: sent 5.
Prozess 3/3: is active.
Prozess 3/3: got 5.
Prozess 2/2: is active.
Prozess 2/2: got 5.
Prozess 1/1: is active.
Prozess 1/1: got 5.
======================================


Alexander del Pino
--

/------------------------------------------------------------------------------\
|  |  |_|_|_|_|      Fraunhofer Institute for Computer Graphics                |
|__|__|_|_|_|_|        Department Visualization & Simulation                   |
|  |  |_|_|_|_|                                                                |
|__|__|_|_|_|_| Alexander del Pino      email : delpino@igd.fhg.de             |
|  __ |     __| Wilhelminenstr. 7       Tel.  : (+49) 6151-155-162             |
| /_  |/_  /_ | D-64283 Darmstadt       Fax   : (+49) 6151-155-199             |
|/    / / /_/ | Germany                                                        |
\------------------------------------------------------------------------------/


