cc_staff
153
edits
No edit summary |
m (Add Fortran 2008 tabs) |
||
Line 127: | Line 127: | ||
MPI_INIT(IERR) | MPI_INIT(IERR) | ||
INTEGER :: IERR | INTEGER :: IERR | ||
</source> | |||
</tab> | |||
<tab name="Fortran 2008"> | |||
<source lang="fortran"> | |||
MPI_Init(ierr) | |||
INTEGER, OPTIONAL, INTENT(OUT) :: ierr | |||
</source> | </source> | ||
</tab> | </tab> | ||
Line 150: | Line 156: | ||
MPI_FINALIZE(IERR) | MPI_FINALIZE(IERR) | ||
INTEGER :: IERR | INTEGER :: IERR | ||
</source> | |||
</tab> | |||
<tab name="Fortran 2008"> | |||
<source lang="fortran"> | |||
MPI_Finalize(ierr) | |||
INTEGER, OPTIONAL, INTENT(OUT) :: ierr | |||
</source> | </source> | ||
</tab> | </tab> | ||
Line 203: | Line 215: | ||
program phello0 | program phello0 | ||
use | use mpi | ||
implicit none | |||
integer :: ierror | integer :: ierror | ||
Line 214: | Line 227: | ||
}} | }} | ||
</tab> | </tab> | ||
</tabs> | <tab name="Fortran 2008"> | ||
{{File | |||
|name=phello0.f90 | |||
|lang="fortran" | |||
|contents= | |||
program phello0 | |||
use mpi_f08 | |||
implicit none | |||
call MPI_Init() | |||
print *, 'Hello, world!' | |||
call MPI_Finalize() | |||
end program phello0 | |||
}} | |||
</tab></tabs> | |||
<translate> | <translate> | ||
=== Rank and Size === <!--T:23--> | === Rank and Size === <!--T:23--> | ||
Line 302: | Line 331: | ||
program phello1 | program phello1 | ||
use | use mpi | ||
implicit none | |||
integer :: rank, size, ierror | integer :: rank, size, ierror | ||
Line 313: | Line 343: | ||
call MPI_FINALIZE(ierror) | call MPI_FINALIZE(ierror) | ||
end program phello1 | |||
}} | |||
</tab> | |||
<tab name="Fortran 2008"> | |||
{{File | |||
|name=phello1.f90 | |||
|lang="fortran" | |||
|contents= | |||
program phello1 | |||
use mpi_f08 | |||
integer :: rank, size | |||
call MPI_Init() | |||
call MPI_Comm_size(MPI_COMM_WORLD, size) | |||
call MPI_Comm_rank(MPI_COMM_WORLD, rank) | |||
print *, 'Hello from process ', rank, ' of ', size | |||
call MPI_Finalize(ierror) | |||
end program phello1 | end program phello1 |