2006-07-14 01:03:36 +04:00
|
|
|
Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
|
|
|
|
University Research and Technology
|
|
|
|
Corporation. All rights reserved.
|
2011-03-10 22:57:40 +03:00
|
|
|
Copyright (c) 2006-2011 Cisco Systems, Inc. All rights reserved.
|
2010-10-06 18:46:52 +04:00
|
|
|
Copyright (c) 2007-2009 Sun Microsystems, Inc. All rights reserved.
|
|
|
|
Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved.
|
2006-07-14 01:03:36 +04:00
|
|
|
|
|
|
|
The files in this directory are sample MPI applications provided both
|
|
|
|
as a trivial primer to MPI as well as simple tests to ensure that your
|
|
|
|
Open MPI installation is working properly.
|
|
|
|
|
|
|
|
If you are looking for a comprehensive MPI tutorial, these samples are
|
2011-03-10 22:57:40 +03:00
|
|
|
not enough. Excellent MPI tutorials are available here:
|
2006-07-14 01:03:36 +04:00
|
|
|
|
2011-03-10 22:57:40 +03:00
|
|
|
http://www.citutor.org/login.php
|
|
|
|
|
|
|
|
Get a free account and login; you can then browse to the list of
|
|
|
|
available courses. Look for the ones with "MPI" in the title.
|
2006-07-14 01:03:36 +04:00
|
|
|
|
|
|
|
There are 2 MPI examples in this directory, each in four languages:
|
|
|
|
|
|
|
|
- Hello world
|
|
|
|
C: hello_c.c
|
|
|
|
C++: hello_cxx.cc
|
|
|
|
F77: hello_f77.f
|
|
|
|
F90: hello_f90.f90
|
|
|
|
|
|
|
|
- Send a trivial message around in a ring
|
|
|
|
C: ring_c.c
|
|
|
|
C++: ring_cxx.cc
|
|
|
|
F77: ring_f77.f
|
|
|
|
F90: ring_f90.f90
|
|
|
|
|
2007-08-07 22:16:37 +04:00
|
|
|
- Test the connectivity between all processes
|
|
|
|
C: connectivity_c.c
|
|
|
|
|
2006-07-14 01:03:36 +04:00
|
|
|
The Makefile in this directory will build as many of the examples as
|
|
|
|
you have language support (e.g., if you do not have F90 bindings
|
|
|
|
compiled as part of Open MPI, the F90 examples will be skipped).
|
|
|
|
|
|
|
|
The Makefile assumes that the wrapper compilers mpicc, mpic++, mpif77,
|
|
|
|
and mpif90 are in your path.
|
|
|
|
|
|
|
|
Although the Makefile is tailored for Open MPI (e.g., it checks the
|
|
|
|
"ompi_info" command to see if you have support for C++, F77, and F90),
|
|
|
|
all of the example programs are pure MPI, and therefore not specific
|
|
|
|
to Open MPI. Hence, you can use a different MPI implementation to
|
2010-10-06 18:46:52 +04:00
|
|
|
compile and run these programs if you wish.
|
2006-07-14 01:03:36 +04:00
|
|
|
|
|
|
|
Make today an Open MPI day!
|