I get this weird error message when compile a simple MPI test.
% mpif90 testsimple2.f
testsimple2.f
PGF90-S-0307-IF-THEN and ENDIF must have the construct name stoptimer (testsimple2.f: 33)
PGF90-S-0038-Symbol, count_rateendtimer, has not been explicitly declared (testsimple2.f)
PGF90-S-0038-Symbol, dtimeinitialize, has not been explicitly declared (testsimple2.f)
0 inform, 0 warnings, 3 severes, 0 fatal for sparkcode
PROGRAM Test
IMPLICIT NONE
INCLUDE 'mpif.h'
INTEGER :: mpierror, numprocs, myrank
DOUBLE PRECISION :: mytime, maxtime, mintime, avgtime
INTEGER :: count0, count1, count_max, count_rate, dtime
LOGICAL :: flag
INTEGER :: data
CHARACTER (MPI_MAX_ERROR_STRING+1) :: err_msg
! start timer
CALL SYSTEM_CLOCK(count0, count_rate, count_max)
CALL MPI_Init(mpierror)
IF( mpierror .NE. MPI_SUCCESS) THEN
PRINT *, "Error Init MPI"
STOP
END IF
CALL MPI_Comm_Size(MPI_COMM_WORLD, numprocs, mpierror)
IF( mpierror .NE. MPI_SUCCESS) THEN
PRINT *, "Error Detect Communicator size"
STOP
END IF
CALL MPI_Comm_Rank(MPI_COMM_WORLD, myrank, mpierror)
IF( mpierror .NE. MPI_SUCCESS) THEN
PRINT *, "Error Detect process rank"
STOP
END IF
! stop timer
CALL SYSTEM_CLOCK(count1, count_rate, count_max)
dtime = (count1-count0)/count_rate
! end timer
! one process acts as pseudo-host and do the find compKs
IF (myrank .EQ. 0) THEN
PRINT *, "Time to initialize MPI is ", dtime
! initialize
data = 1000
ENDIF
CALL MPI_Bcast(data, 1, MPI_INTEGER, 0, MPI_COMM_WORLD, mpierror)
IF( mpierror .NE. MPI_SUCCESS) THEN
PRINT *, "Error Broadcast message"
STOP
END IF
CALL MPI_Barrier(MPI_COMM_WORLD, mpierror)
IF( mpierror .NE. MPI_SUCCESS) THEN
PRINT *, "Error Barrier"
STOP
END IF
IF (myrank .EQ. 0) THEN
PRINT *, "End test"
END IF
STOP
END PROGRAM Test