Basic HTML version of Foils prepared August 29 98

Foil 21 Simple Fortran Example

From Designing and Building Parallel Programs 3: MPI Message Passing System DoD Modernization Tutorial -- 1995-1998. by Ian Foster, Gina Goff, Ehtesham Hayder, Chuck Koelbel


1 program main
2 include 'mpif.h'
3 integer rank, size, tag, count, i, ierr
4 integer src, dest, st_source, st_tag, st_count
5 integer status(MPI_STATUS_SIZE)
6 call MPI_INIT( ierr )
7 call MPI_COMM_RANK( MPI_COMM_WORLD, rank, ierr )
8 call MPI_COMM_SIZE( MPI_COMM_WORLD, size, ierr )
9 print *, 'Process ', rank, ' of ', size, ' is alive'
10 ...

in Table To:


© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Sun Apr 11 1999