Changes between Version 9 and Version 10 of FermeLocale


Ignore:
Timestamp:
03/12/2014 10:57:40 (10 years ago)
Author:
/O=GRID-FR/C=FR/O=CNRS/OU=LPSC/CN=Frederic Melot
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • FermeLocale

    v9 v10  
    6060      end
    6161}}}
     62
     63ou
     64
     65{{{
     66#include <stdio.h>
     67#include <mpi.h>
     68
     69int main(int argc, char** argv){
     70  int rank, size;
     71
     72  MPI_Init (&argc, &argv);      /* starts MPI */
     73  MPI_Comm_rank (MPI_COMM_WORLD, &rank);        /* get current process id */
     74  MPI_Comm_size (MPI_COMM_WORLD, &size);        /* get number of processes */
     75  char processor_name[MPI_MAX_PROCESSOR_NAME];
     76  int name_len;
     77  MPI_Get_processor_name(processor_name, &name_len);
     78  printf( "Hello world from process %d of %d executed on %s\n", rank, size, processor_name );
     79  MPI_Finalize();
     80  return 0;
     81}
     82
     83}}}