1 C -*- Mode: Fortran; -*-
4 C (C) 2001 by Argonne National Laboratory.
5 C See COPYRIGHT in top-level directory.
12 integer value, commsize, commrank
17 call mpi_comm_size( MPI_COMM_WORLD, commsize, ierr )
18 call mpi_comm_rank( MPI_COMM_WORLD, commrank, ierr )
20 call mpi_attr_get( MPI_COMM_WORLD, MPI_TAG_UB, value, flag, ierr
24 print *, "Could not get TAG_UB"
26 if (value .lt. 32767) then
28 print *, "Got too-small value (", value, ") for TAG_UB"
32 call mpi_attr_get( MPI_COMM_WORLD, MPI_HOST, value, flag, ierr )
35 print *, "Could not get HOST"
37 if ((value .lt. 0 .or. value .ge. commsize) .and. value .ne.
40 print *, "Got invalid value ", value, " for HOST"
44 call mpi_attr_get( MPI_COMM_WORLD, MPI_IO, value, flag, ierr )
47 print *, "Could not get IO"
49 if ((value .lt. 0 .or. value .ge. commsize) .and. value .ne.
50 $ MPI_ANY_SOURCE .and. value .ne. MPI_PROC_NULL) then
52 print *, "Got invalid value ", value, " for IO"
56 call mpi_attr_get( MPI_COMM_WORLD, MPI_WTIME_IS_GLOBAL, value,
59 C Wtime need not be set
60 if (value .lt. 0 .or. value .gt. 1) then
62 print *, "Invalid value for WTIME_IS_GLOBAL (got ", value,
67 call mpi_attr_get( MPI_COMM_WORLD, MPI_APPNUM, value, flag, ierr
69 C appnum need not be set
71 if (value .lt. 0) then
73 print *, "MPI_APPNUM is defined as ", value,
74 $ " but must be nonnegative"
78 call mpi_attr_get( MPI_COMM_WORLD, MPI_UNIVERSE_SIZE, value,
80 C MPI_UNIVERSE_SIZE need not be set
82 if (value .lt. commsize) then
84 print *, "MPI_UNIVERSE_SIZE = ", value,
85 $ ", less than comm world (", commsize, ")"
89 call mpi_attr_get( MPI_COMM_WORLD, MPI_LASTUSEDCODE, value, flag
91 C Last used code must be defined and >= MPI_ERR_LASTCODE
93 if (value .lt. MPI_ERR_LASTCODE) then
95 print *, "MPI_LASTUSEDCODE points to an integer (",
96 $ MPI_ERR_LASTCODE, ") smaller than MPI_ERR_LASTCODE (",
101 print *, "MPI_LASTUSECODE is not defined"
105 if (errs .eq. 0) then
106 print *, " No Errors"
108 print *, " Found ", errs, " errors"
111 call MPI_Finalize( ierr )