Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |  

This web mail archive is frozen.

This page is part of a frozen web archive of this mailing list.

You can still navigate around this archive, but know that no new mails have been added to it since July of 2016.

Click here to be taken to the new web archives of this list; it includes all the mails that are in this frozen archive plus all new mails that have been sent to the list since it was migrated to the new archives.

Subject: Re: [OMPI users] A simple mpi code hangs at MPI_Init?
From: Sang Chul Choi (goshng_at_[hidden])
Date: 2008-05-12 13:51:27


Hi,

I think that ubuntu's package version might have some problem. I just
downloaded source code from open mpi and it just worked after source
installation.

Thank you,

Sang Chul

P.S. The code was as follows. I ran it with $ mpirun -n 2 hello

===============================================================================
#include <stdio.h>
#include <mpi.h>

int
main (int argc, char *argv[])
{

  int myrank, size;

  fprintf (stderr, "Before MPI_Init\n");
  MPI_Init (&argc, &argv); /* Initialize MPI */
  MPI_Comm_rank (MPI_COMM_WORLD, &myrank); /* Get my rank */
  MPI_Comm_size (MPI_COMM_WORLD, &size); /* Get the total
                                                   number of processors */
  fprintf (stderr, "MPI_Comm_size\n");
  printf ("Processor %d of %d: Hello World!\n", myrank, size);

  MPI_Finalize (); /* Terminate MPI */

  return 0;
}
===============================================================================

On Wed, May 7, 2008 at 5:48 PM, Barry Rountree <rountree_at_[hidden]> wrote:
> On Wed, May 07, 2008 at 03:47:24PM -0400, Sang Chul Choi wrote:
> > Hi,
> >
> > I tried to run a hello world example of mpi code. It just hangs at
> > MPI_Init. My machine is installed with Ubuntu linux and I install some
> > package of open mpi. Compiling was okay, but running the code hangs at
> > MPI_Init. Is there any specific things that I should do before running
> > mpi code such as "mpd" setup?
> >
> > I will appreciate any help.
>
> Could you post the code and how you're executing it?
>
>
> >
> > Thank you,
> >
> > Sang Chul
> >
> > --
> > ===============================
> > Live, Learn, and Love!
> > Sang Chul is at Piscataway.
> > Work: +1-732-445-2681
> > ===============================
>
>
> > _______________________________________________
> > users mailing list
> > users_at_[hidden]
> > http://www.open-mpi.org/mailman/listinfo.cgi/users
> _______________________________________________
> users mailing list
> users_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/users
>