Newsgroups: comp.parallel.mpi
From: gdburns@osc.edu (Greg Burns)
Subject: Re: Problem with LAM 6.0?
Organization: Ohio Supercomputer Center
Date: 24 Aug 1996 04:42:40 -0400
Message-ID: <4vmfa0$7ht@tbag.osc.edu>

In article <DwLqD8.GEz.0.staffin.dcs.ed.ac.uk@dcs.ed.ac.uk> tst@dcs.ed.ac.uk (Tristan Tarrant) writes:
>Under LAM 6.0 (with the latest patches) running the following:
>
>#include <mpp/mpi.h>
>
>int main(int argc, char *argv[]) {
>
>    MPI_Comm comm;
>
>    int i;
>
>    MPI_Init(&argc, &argv);
>
>    for (i=0; i<100000; i++) {
>
>        MPI_Comm_dup(MPI_COMM_WORLD, &comm);
>        MPI_Comm_free(&comm);
>
>    }
>	MPI_Finalize();
>}
>
>
>Eats memory away and fails with the following message:
>
>MPI_Comm_dup: internal MPI error: out of descriptors (rank 2, comm 0)
>
>Is this correct behaviour or is it a bug ?

The memory leak is a bug and has been repaired.

The error message is not a bug.  For debugging reasons, LAM does not
recycle communicator context values.  It might be confusing to the
user to see the same context twice in a program execution.
In 6.0 there are only 4094 contexts to hand out, hence the message.
The number will be increased to something close to MAXINT / 2 in
future versions.

-=-
Greg Burns				gdburns@osc.edu
Ohio Supercomputer Center		http://www.osc.edu/lam.html

