Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

Subject: [OMPI users] Execution don't go back to shell after MPI_Finalize()
From: Yves Caniou (yves.caniou_at_[hidden])
Date: 2010-05-19 11:50:08

Dear all,

I use the following code:
#include "stdlib.h"
#include "stdio.h"
#include "mpi.h"
#include "math.h"

#include "unistd.h" /* sleep */

int my_num, mpi_size ;

main(int argc, char *argv[])
  MPI_Init(&argc, &argv) ;

  MPI_Comm_rank(MPI_COMM_WORLD, &my_num);
  MPI_Comm_size(MPI_COMM_WORLD, &mpi_size);
  printf("%d calls MPI_Finalize()\n\n\n", my_num) ;

  MPI_Finalize() ;

I compile and run the code on two different architectures with their own
version/installation of open-mpi, with the command lines:
$>mpicc -lm --std=c99 basis.c
$>mpiexec -n 1 a.out

On numerous runs of the executable, even with a nbproc equal to 1:

- Using a debian open-mpi v 1.2.7rc2 installation, my code always returns to
shell after the call to MPI_Finalize()
Kernel is 2.6.34 SMP, Intel P9600 2 cores

- Using a homemade open-mpi v 1.4.2 installation, my code runs as expected,
but instead of returning to the shell after the MPI_Finalize(), it can just
hangs in Sl+ state.
Kernel is 2.6.18-53.1.19.el5 SMP (RedHat), Quad-Core AMD Opteron 8356

I join the ompi_info of the 2 archs. I surely miss something... but what?