Bas van der Vlies wrote:
Hello,

We are testing openmpi version 1.2 on Debian etch with openib. Some of our users are using scalapack/blacs that are running for a long time use a lot of mpi_comm functions. we have made a small C example that test if the mpi can handle this situation (see attach file). When we run this program wit argument 1000000 we see that it consumes more and more memory, eg:
   <progname>  1000000

Regards

Forgot to attach theh file :-(


--
********************************************************************
*                                                                  *
*  Bas van der Vlies                     e-mail: b...@sara.nl      *
*  SARA - Academic Computing Services    phone:  +31 20 592 8012   *
*  Kruislaan 415                         fax:    +31 20 6683167    *
*  1098 SJ Amsterdam                                               *
*                                                                  *
********************************************************************
#include <mpi.h>
#include <stdio.h>
int main(int argc, char *argv[])
{
MPI_Comm comm;

int size,rank;
MPI_Init(&argc,&argv);
MPI_Comm_size(MPI_COMM_WORLD,&size);
MPI_Comm_rank(MPI_COMM_WORLD,&rank);
int n;

if (argc > 1)
  n=atoi(argv[1]);
else
  n=10000;

if (rank == 0)
{
   printf("Running with %d processes\n",size);
   printf("will do %d dups and frees\n",n);
}

int i;
for (i=0; i<n; i++)
  {
    if (i%100 == 0)
      if (rank == 0)
	printf(".");
    if (i%10000 == 0)
      if (rank == 0)
	printf("\n");

    MPI_Comm_dup(MPI_COMM_WORLD, &comm);
    MPI_Comm_free(&comm);
  }
  if (rank == 0)
    printf("\nStill alive!\n");
  MPI_Finalize();
}

Reply via email to