Skip to content

Commit

Permalink
simply use
Browse files Browse the repository at this point in the history
  • Loading branch information
scivision committed Feb 8, 2024
1 parent cee233d commit 968a6a1
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
4 changes: 2 additions & 2 deletions test/basic.f90
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
program basic

use mpi_f08, only : mpi_init, mpi_finalize
use mpi_f08

implicit none
implicit none (type, external)

print *, "going to init MPI"

Expand Down
3 changes: 2 additions & 1 deletion test/helloworld.f90
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ program hw_mpi
!! Original Author: John Burkardt
!! Modified: Michael Hirsch, Ph.D.

use mpi_f08, only : mpi_init, mpi_comm_size, mpi_comm_world, mpi_wtime, mpi_comm_rank, mpi_finalize
use, intrinsic:: iso_fortran_env, only: dp=>real64, compiler_version

use mpi_f08

implicit none

integer :: id, Nproc
Expand Down
4 changes: 2 additions & 2 deletions test/mpivers.f90
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ program mpi_vers
! https://github.com/open-mpi/ompi/blob/master/examples/hello_usempif08.f90

use, intrinsic :: iso_fortran_env, only : compiler_version
use mpi_f08, only : MPI_MAX_LIBRARY_VERSION_STRING, mpi_get_library_version, mpi_init, &
MPI_COMM_SIZE, mpi_comm_world, mpi_finalize, mpi_comm_rank

use mpi_f08

implicit none

Expand Down
8 changes: 4 additions & 4 deletions test/thread_pass.f90
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ program mpi_pass
!! This would be much simpler using Fortran 2008 coarray syntax
!!
!! Original author: John Burkardt

use, intrinsic :: iso_fortran_env, only: real32, compiler_version, int64
use mpi_f08, only : mpi_status, mpi_comm_world, mpi_init, mpi_get_count, &
mpi_real, mpi_any_source, mpi_any_tag, mpi_source, mpi_tag, mpi_comm_size, &
mpi_comm_rank, mpi_recv, mpi_send, mpi_finalize

use mpi_f08

implicit none

Expand Down Expand Up @@ -46,7 +46,7 @@ program mpi_pass

print *, id, ' Got ', mcount, ' elements.'

if (val(5) /= 4) error stop "data did not transfer"
if (abs(val(5)-4) > epsilon(0.)) error stop "data did not transfer"

! Process 1 sends 100 real values to process 0.
case (1)
Expand Down

0 comments on commit 968a6a1

Please sign in to comment.