PROGRAM MAIN INCLUDE 'mpif.h' INTEGER COMM, RESULT CALL MPI_INIT( IERR ) CALL MPI_COMM_DUP(MPI_COMM_WORLD, COMM, IERR) CALL MPI_COMM_COMPARE(MPI_COMM_WORLD, COMM, RESULT, IERR) IF ( RESULT .EQ. MPI_IDENT ) THEN PRINT *, 'The two communicators are identical.' ELSE IF ( RESULT .EQ. MPI_CONGRUENT ) THEN PRINT *, 'The two communicators are congruent.' ELSE IF ( RESULT .EQ. MPI_SIMILAR ) THEN PRINT *, 'The two communicators are similar.' ELSE IF ( RESULT .EQ. MPI_UNEQUAL ) THEN PRINT *, 'The two communicators are unequal.' ELSE PRINT *, 'Unknown result.' ENDIF CALL MPI_FINALIZE(RC) STOP END