diff --git a/test/mpi/basic/wtime.c b/test/mpi/basic/wtime.c index bcad008..5a137fe 100644 --- a/test/mpi/basic/wtime.c +++ b/test/mpi/basic/wtime.c @@ -16,7 +16,7 @@ int main(int argc, char *argv[]) MPI_Comm_rank(MPI_COMM_WORLD, &i); dStart = MPI_Wtime(); - sleep(1); + MTestSleep(1); dFinish = MPI_Wtime(); dDuration = dFinish - dStart; diff --git a/test/mpi/errors/faults/pt2ptf2.c b/test/mpi/errors/faults/pt2ptf2.c index 248eb28..5ffcb7e 100644 --- a/test/mpi/errors/faults/pt2ptf2.c +++ b/test/mpi/errors/faults/pt2ptf2.c @@ -49,7 +49,7 @@ int main( int argc, char *argv[] ) else { /* To improve the chance that the "faulted" processes will have exited, wait for 1 second */ - sleep( 1 ); + MTestSleep( 1 ); } /* Can we still use newcomm? */ diff --git a/test/mpi/group/gtranksperf.c b/test/mpi/group/gtranksperf.c index 9dfb52e..98b79d2 100644 --- a/test/mpi/group/gtranksperf.c +++ b/test/mpi/group/gtranksperf.c @@ -9,9 +9,6 @@ #include "mpitest.h" #include /* for fabs(3) */ -#ifdef HAVE_UNISTD_H -#include /* for sleep(3) */ -#endif /* Measure and compare the relative performance of MPI_Group_translate_ranks * with small and large group2 sizes but a constant number of ranks. This @@ -89,10 +86,10 @@ int main( int argc, char *argv[] ) MPI_Barrier(comm); if (rank != 0) { - sleep(10); + MTestSleep(10); } else /* rank==0 */ { - sleep(1); /* try to avoid timing while everyone else is making syscalls */ + MTestSleep(1); /* try to avoid timing while everyone else is making syscalls */ MPI_Group_translate_ranks(grev, size, ranks, gworld, ranksout); /*throwaway iter*/ start = MPI_Wtime(); diff --git a/test/mpi/manual/mpi_t/nem_fbox_fallback_to_queue_count.c b/test/mpi/manual/mpi_t/nem_fbox_fallback_to_queue_count.c index c6dec0b..b397a99 100644 --- a/test/mpi/manual/mpi_t/nem_fbox_fallback_to_queue_count.c +++ b/test/mpi/manual/mpi_t/nem_fbox_fallback_to_queue_count.c @@ -92,13 +92,13 @@ void send_first_test() * FIXME: Ideally this should use a barrier, but that uses messages * internally and hence will sometimes screw up the asserts above. */ - sleep(1); + MTestSleep(1); } else if (rank == 1) { char recv_buf[BUF_COUNT]; MPI_Status status; - sleep(1); /* see above */ + MTestSleep(1); /* see above */ MPI_Recv(recv_buf, BUF_COUNT, MPI_CHAR, 0, 0, MPI_COMM_WORLD, &status); MPI_Recv(recv_buf, BUF_COUNT, MPI_CHAR, 0, 0, MPI_COMM_WORLD, &status); diff --git a/test/mpi/manual/spawntest_master.c b/test/mpi/manual/spawntest_master.c index 62e87fd..bb02481 100644 --- a/test/mpi/manual/spawntest_master.c +++ b/test/mpi/manual/spawntest_master.c @@ -48,11 +48,11 @@ int main( int argc, char *argv[] ) { MPI_Comm_free( &allcomm ); MPI_Comm_disconnect( &intercomm ); - fprintf(stdout, "%s:%d: Sleep starting; children should exit\n", + fprintf(stdout, "%s:%d: MTestSleep starting; children should exit\n", __FILE__, __LINE__ );fflush(stdout); - sleep(30); + MTestSleep(30); fprintf(stdout, - "%s:%d: Sleep done; all children should have already exited\n", + "%s:%d: MTestSleep done; all children should have already exited\n", __FILE__, __LINE__ );fflush(stdout); MPI_Finalize(); diff --git a/test/mpi/manual/testconnectserial.c b/test/mpi/manual/testconnectserial.c index 88d3bf4..10ef028 100644 --- a/test/mpi/manual/testconnectserial.c +++ b/test/mpi/manual/testconnectserial.c @@ -119,7 +119,7 @@ int main( int argc, char ** argv ) { if( expectedRank == 0 ) { /* Cleanup on rank zero - delete some files */ - sleep( 4 ); + MTestSleep( 4 ); unlink( actualFname ); free( actualFname ); unlink( globalFname ); diff --git a/test/mpi/threads/comm/comm_dup_deadlock.c b/test/mpi/threads/comm/comm_dup_deadlock.c index c44b8fd..23a28be 100644 --- a/test/mpi/threads/comm/comm_dup_deadlock.c +++ b/test/mpi/threads/comm/comm_dup_deadlock.c @@ -21,10 +21,6 @@ } \ } while (0) -#ifdef HAVE_WINDOWS_H -#define sleep(a) Sleep(a*1000) -#endif - MPI_Comm comms[NUM_THREADS]; MTEST_THREAD_LOCK_TYPE comm_lock; int rank, size; @@ -41,7 +37,7 @@ MTEST_THREAD_RETURN_TYPE test_comm_dup(void *arg) MPI_Comm comm, self_dup; if (*(int*)arg == rank) { - sleep(1); + MTestSleep(1); } MTest_thread_lock(&comm_lock); diff --git a/test/mpi/threads/comm/ctxdup.c b/test/mpi/threads/comm/ctxdup.c index 3f3a9b3..bad21a9 100644 --- a/test/mpi/threads/comm/ctxdup.c +++ b/test/mpi/threads/comm/ctxdup.c @@ -15,10 +15,6 @@ static char MTEST_Descrip[] = "Creating communications concurrently in different threads"; */ -#ifdef HAVE_WINDOWS_H -#define sleep(a) Sleep(a*1000) -#endif - MTEST_THREAD_RETURN_TYPE dup_thread(void *); MTEST_THREAD_RETURN_TYPE dup_thread(void *p) @@ -88,7 +84,7 @@ int main( int argc, char *argv[] ) /* If we're odd, send to our new thread and then delay */ if (rank & 0x1) { MPI_Ssend( buffer, 0, MPI_INT, rank, 0, MPI_COMM_WORLD ); - sleep(1); + MTestSleep(1); } MPI_Comm_dup( comm1, &comm4 );