! helloWorld2F.f90 program main include "mpif.h" integer myid, size integer ierr call MPI_INIT(ierr) call MPI_COMM_RANK(MPI_COMM_WORLD, myid, ierr) call MPI_COMM_SIZE(MPI_COMM_WORLD, size, ierr) print *, 'Hello world. I am process ', myid, ' out of ', size call MPI_FINALIZE(ierr) end program ! Cray SV1 version: ! f90 helloWorldF.f90 ! mpirun -np 8 a.out ! Hello world. I am process 7 out of 8 ! Hello world. I am process 4 out of 8 ! Hello world. I am process 5 out of 8 ! Hello world. I am process 6 out of 8 ! Hello world. I am process 3 out of 8 ! Hello world. I am process 1 out of 8 ! Hello world. I am process 0 out of 8 ! Hello world. I am process 2 out of 8 ! mpirun -np 4 a.out