[CIG-LONG] new install
Matty Mookerjee
matty.mookerjee at sonoma.edu
Sun Feb 3 20:20:55 PST 2013
Walter,
OK, I think I did what you wanted. Here are the results:
matty at matty-ThinkPad-T530:~/Programs$ mpicc -c hello.c
matty at matty-ThinkPad-T530:~/Programs$ mpicc -o hello hello.o
matty at matty-ThinkPad-T530:~/Programs$ mpirun hello
Hello world from process 0 of 1
matty at matty-ThinkPad-T530:~/Programs$ mpirun -np 2 hello
Hello world from process 0 of 2
Hello world from process 1 of 2
matty at matty-ThinkPad-T530:~/Programs$
How does that look?
Matty
________________________________________
From: cig-long-bounces at geodynamics.org [cig-long-bounces at geodynamics.org] on behalf of Walter Landry [wlandry at caltech.edu]
Sent: Saturday, February 02, 2013 10:24 AM
To: cig-long at geodynamics.org
Subject: Re: [CIG-LONG] new install
Matty <matty.mookerjee at sonoma.edu> wrote:
> Here you go:
This all looks ok. Lets try making sure that you can compile simple
MPI programss. Try compiling and running the attached program with
mpicc -c hello.c
mpicc -o hello hello.o
mpirun hello
mpirun -np 2 hello
Cheers,
Walter Landry
-------------------------------------------------
#include <stdio.h>
#include <mpi.h>
int main (argc, argv)
int argc;
char *argv[];
{
int rank, size;
MPI_Init (&argc, &argv);
MPI_Comm_rank (MPI_COMM_WORLD, &rank);
MPI_Comm_size (MPI_COMM_WORLD, &size);
printf( "Hello world from process %d of %d\n", rank, size );
MPI_Finalize();
return 0;
}
_______________________________________________
CIG-LONG mailing list
CIG-LONG at geodynamics.org
http://geodynamics.org/cgi-bin/mailman/listinfo/cig-long
More information about the CIG-LONG
mailing list