tags:

views:

53

answers:

2

I have the simplest code "Hello world"

#include <stdio.h>  /* printf and BUFSIZ defined there */
#include <stdlib.h> /* exit defined there */
#include <mpi.h>    /* all MPI-2 functions defined there */

int main(argc, argv)
int argc;
char *argv[];
{
   int rank, size, length;
   char name[BUFSIZ];

   MPI_Init(&argc, &argv);
   MPI_Comm_rank(MPI_COMM_WORLD, &rank);
   MPI_Comm_size(MPI_COMM_WORLD, &size);
   MPI_Get_processor_name(name, &length);

   printf("%s: hello world from process %d of %d\n", name, rank, size);

   MPI_Finalize();

   exit(0);
}

I have compiled it

mpicc -o hello hello.c

and tried to run it with 4 processes

mpirun -np 4 hello

it returns;

chasan@ubuntu:~/MpiProgrammes$ mpicc -o hello Hello.c
chasan@ubuntu:~/MpiProgrammes$ mpirun -np 4 hello
Alarm clock
chasan@ubuntu:~/MpiProgrammes$

What could it be ?

A: 
chasan@ubuntu:~/MpiProgrammes$ laminfo
             LAM/MPI: 7.1.2
              Prefix: /usr/lib/lam
        Architecture: i486-pc-linux-gnu
       Configured by: buildd
       Configured on: Wed Nov  5 07:09:57 UTC 2008
      Configure host: rothera
      Memory manager: ptmalloc2
          C bindings: yes
        C++ bindings: yes
    Fortran bindings: yes
          C compiler: gcc
        C++ compiler: g++
    Fortran compiler: gfortran
     Fortran symbols: underscore
         C profiling: yes
       C++ profiling: yes
   Fortran profiling: yes
      C++ exceptions: no
      Thread support: yes
       ROMIO support: yes
        IMPI support: no
       Debug support: no
        Purify clean: no
            SSI boot: globus (API v1.1, Module v0.6)
            SSI boot: rsh (API v1.1, Module v1.1)
            SSI boot: slurm (API v1.1, Module v1.0)
            SSI coll: lam_basic (API v1.1, Module v7.1)
            SSI coll: shmem (API v1.1, Module v1.0)
            SSI coll: smp (API v1.1, Module v1.2)
             SSI rpi: crtcp (API v1.1, Module v1.1)
             SSI rpi: lamd (API v1.0, Module v7.1)
             SSI rpi: sysv (API v1.0, Module v7.1)
             SSI rpi: tcp (API v1.0, Module v7.1)
             SSI rpi: usysv (API v1.0, Module v7.1)
              SSI cr: self (API v1.0, Module v1.0)
anarhikos
A: 

try using the command "mpd &"

melih