Skip to content

Commit

Permalink
timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Applencourt committed Sep 3, 2024
1 parent 348ed94 commit 6b00e26
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
14 changes: 7 additions & 7 deletions integration_tests/light_iprof_only_sync.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ RT_SIGNAL_FINISH=$((SIGRTMIN + 3))
SIGNAL_RECEIVED="false"
# Signal handler for capturing signals
handle_signal() {
echo "$PARENT_PID | Received signal $1 from mpi_daemon"
echo "$PARENT_PID $(date) | Received signal $1 from mpi_daemon"
if [ "$1" == "RT_SIGNAL_READY" ]; then
SIGNAL_RECEIVED="true"
fi
Expand Down Expand Up @@ -42,19 +42,19 @@ PARENT_PID=$$
# Start sync daemon in the background
${THAPI_BIN_DIR}/sync_daemon_${THAPI_SYNC_DAEMON} $PARENT_PID &
DAEMON_PID=$!
echo "$PARENT_PID | Wait for daemon to be ready"
echo "$PARENT_PID $(date) | Wait for daemon to be ready"
wait_for_signal
echo "$PARENT_PID | Send Local Barrier signal"
echo "$PARENT_PID $(date) | Send Local Barrier signal"
send_signal_blocking $RT_SIGNAL_LOCAL_BARRIER
# Run test program
"$@"

# Final synchronization after mpi_hello_world execution
echo "$PARENT_PID | Send Local Barrier signal"
echo "$PARENT_PID $(date) | Send Local Barrier signal"
send_signal_blocking $RT_SIGNAL_LOCAL_BARRIER
echo "$PARENT_PID | Send Global Barrier signal"
echo "$PARENT_PID $(date) | Send Global Barrier signal"
send_signal_blocking $RT_SIGNAL_GLOBAL_BARRIER
echo "$PARENT_PID | Send Termination signal"
echo "$PARENT_PID $(date) | Send Termination signal"
send_signal_blocking $RT_SIGNAL_FINISH
echo "$PARENT_PID | Wait for daemon to quit"
echo "$PARENT_PID $(date) | Wait for daemon to quit"
wait $DAEMON_PID
12 changes: 6 additions & 6 deletions integration_tests/parallel_execution.bats
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,27 @@ teardown_file() {
}

@test "sync_daemon_fs" {
THAPI_SYNC_DAEMON=fs THAPI_JOBID=0 timeout 40s $MPIRUN -n 2 ./integration_tests/light_iprof_only_sync.sh $THAPI_TEST_BIN
THAPI_SYNC_DAEMON=fs THAPI_JOBID=0 timeout 60s $MPIRUN -n 2 ./integration_tests/light_iprof_only_sync.sh $THAPI_TEST_BIN
}

@test "iprof_fs" {
THAPI_SYNC_DAEMON=fs THAPI_JOBID=0 timeout 40s $MPIRUN -n 2 $IPROF --debug 0 -- $THAPI_TEST_BIN
THAPI_SYNC_DAEMON=fs THAPI_JOBID=0 timeout 60s $MPIRUN -n 2 $IPROF --debug 0 -- $THAPI_TEST_BIN
}

@test "sync_daemon_fs_launching_mpi_app" {
mpicc ./integration_tests/mpi_helloworld.c -o mpi_helloworld
THAPI_SYNC_DAEMON=fs THAPI_JOBID=0 timeout 40s $MPIRUN -n 2 ./integration_tests/light_iprof_only_sync.sh ./mpi_helloworld
THAPI_SYNC_DAEMON=fs THAPI_JOBID=0 timeout 60s $MPIRUN -n 2 ./integration_tests/light_iprof_only_sync.sh ./mpi_helloworld
}

@test "sync_daemon_mpi" {
THAPI_SYNC_DAEMON=mpi THAPI_JOBID=0 timeout 40s $MPIRUN -n 2 ./integration_tests/light_iprof_only_sync.sh $THAPI_TEST_BIN
THAPI_SYNC_DAEMON=mpi THAPI_JOBID=0 timeout 60s $MPIRUN -n 2 ./integration_tests/light_iprof_only_sync.sh $THAPI_TEST_BIN
}

@test "iprof_mpi" {
THAPI_SYNC_DAEMON=mpi THAPI_JOBID=0 timeout 40s $MPIRUN -n 2 $IPROF --debug 0 -- $THAPI_TEST_BIN
THAPI_SYNC_DAEMON=mpi THAPI_JOBID=0 timeout 60s $MPIRUN -n 2 $IPROF --debug 0 -- $THAPI_TEST_BIN
}

@test "sync_daemon_mpi_launching_mpi_app" {
mpicc ./integration_tests/mpi_helloworld.c -o mpi_helloworld
THAPI_SYNC_DAEMON=mpi THAPI_JOBID=0 timeout 40s $MPIRUN -n 2 ./integration_tests/light_iprof_only_sync.sh ./mpi_helloworld
THAPI_SYNC_DAEMON=mpi THAPI_JOBID=0 timeout 60s $MPIRUN -n 2 ./integration_tests/light_iprof_only_sync.sh ./mpi_helloworld
}

0 comments on commit 6b00e26

Please sign in to comment.