LAM/MPI logo

LAM/MPI General User's Mailing List Archives

  |   Home   |   Download   |   Documentation   |   FAQ   |   all just in this list

From: Dr. Stephan Nickell (nickell_at_[hidden])
Date: 2005-06-28 02:21:56


Hiho,

a simple C code:

>> cat hi.c

#include <stdio.h>
#include "mpi.h"
int main(int argc, char *argv[])
{
char greet[12];
int i, numprocs, myid;
MPI_Status status;
MPI_Init(&argc,&argv);
MPI_Comm_size(MPI_COMM_WORLD,&numprocs);
MPI_Comm_rank(MPI_COMM_WORLD,&myid);
if(myid == 0)
{
sprintf(greet,"Hello world");
}
printf("%s from processor %d of %d.\n",&greet,myid,numprocs);
MPI_Finalize();
}

executed by:

mpirun -np 4 ./hi
Hello world from processor 0 of 1.
-----------------------------------------------------------------------------
It seems that [at least] one of the processes that was started with
mpirun did not invoke MPI_INIT before quitting (it is possible that
more than one process did not invoke MPI_INIT -- mpirun was only
notified of the first one, which was on node n0).

mpirun can *only* be used with MPI programs (i.e., programs that
invoke MPI_INIT and MPI_FINALIZE). You can use the "lamexec" program
to run non-MPI programs over the lambooted nodes.
-----------------------------------------------------------------------------

while lamboot worked fine:
 lamboot -v lamboot.amd

LAM 7.1.1/MPI 2 C++/ROMIO - Indiana University

n-1<19857> ssi:boot:base:linear: booting n0 (jakarta)
n-1<19857> ssi:boot:base:linear: booting n1 (cairo)
n-1<19857> ssi:boot:base:linear: booting n2 (kyoto)
n-1<19857> ssi:boot:base:linear: booting n3 (tucson)
n-1<19857> ssi:boot:base:linear: finished

The number of procs should be 4 and it shouldn't hang, or?

Thanks for your help!

Stephan

---------------------------------------------------------------------
     This message was sent using https://webmail.biochem.mpg.de
If you encounter any problems please report to rz-linux_at_[hidden]