From: Joachim Worringen <joachim@lfbs.rwth-aachen.de>
Newsgroups: comp.parallel.mpi
Subject: Re: MPI_Barrier - how about argument checking ?
Date: Tue, 15 Sep 1998 17:27:35 +0200
Organization: Chair for Operating Systems, RWTH Aachen
Message-Id: <35FE8767.BAE39B43@lfbs.rwth-aachen.de>
References: <35FD350E.41C6@malaga.math.uni-augsburg.de>
    <35FE193D.44BD5EAF@lfbs.rwth-aachen.de>
    <35FE2108.41C6@malaga.math.uni-augsburg.de>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit


Peter Schaefer wrote:
> 
> To be more clear:
> 
> I wrote
> MPI_Barrier(nprocs);
> 
> and tested with nprocs=4;
> MPI is mpich Version 1.0.13, IRIX/ch_p4 (SGI)
> 
> correct is
> MPI_Barrier(MPI_COMM_WORLD);
> MPI_COMM_WORLD is an integer.

The communicators are integers that serve as an index - MPI_COMM_WORLD
is 91 by default. To apply a barrier to another number of processes, you
have to create a communicator for these processes and call the barrier
with the resulting index.

The pointers retrieved by the index number *are* checked to be a valid
communicator via a cookie-mechanism (which is not 100% safe). Be sure
that this check is not turned of by chance. See src/coll/barrier.c,
mpid/ch2/comm.h and mpid/ch2/cookie.h for more info.

  Joachim

-- 
----------------------------------------------------------------------------
|  _      :  Joachim Worringen, Lehrstuhl fuer Betriebssysteme
|_|_`__   :  RWTH Aachen, Kopernikusstr. 16, D-52056 Aachen
  | |__)  :  Tel.   : +49-241/80-7609  |  Fax : +49-241/8888-339
    |__)S :  e-Mail :  joachim@lfbs.rwth-aachen.de

