Skip to content

Commit

Permalink
Fix if block screwup
Browse files Browse the repository at this point in the history
  • Loading branch information
derobins committed Mar 21, 2024
1 parent 0d42c56 commit 685f817
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 18 deletions.
19 changes: 10 additions & 9 deletions testpar/t_shapesame.c
Original file line number Diff line number Diff line change
Expand Up @@ -3984,17 +3984,18 @@ pause_proc(void)
MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
MPI_Get_processor_name(mpi_name, &mpi_namelen);

if (MAINPROCESS)
if (MAINPROCESS) {
memset(&statbuf, 0, sizeof(h5_stat_t));
while ((HDstat(greenlight, &statbuf) == -1) && loops < maxloop) {
if (!loops++) {
printf("Proc %d (%*s, %d): to debug, attach %d\n", mpi_rank, mpi_namelen, mpi_name, pid, pid);
}
printf("waiting(%ds) for file %s ...\n", time_int, greenlight);
fflush(stdout);
HDsleep(time_int);
while ((HDstat(greenlight, &statbuf) == -1) && loops < maxloop) {
if (!loops++) {
printf("Proc %d (%*s, %d): to debug, attach %d\n", mpi_rank, mpi_namelen, mpi_name, pid, pid);
}
printf("waiting(%ds) for file %s ...\n", time_int, greenlight);
fflush(stdout);
HDsleep(time_int);

memset(&statbuf, 0, sizeof(h5_stat_t));
memset(&statbuf, 0, sizeof(h5_stat_t));
}
}
MPI_Barrier(MPI_COMM_WORLD);
}
Expand Down
19 changes: 10 additions & 9 deletions testpar/testphdf5.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,17 +73,18 @@ pause_proc(void)
MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
MPI_Get_processor_name(mpi_name, &mpi_namelen);

if (MAINPROCESS)
if (MAINPROCESS) {
memset(&statbuf, 0, sizeof(h5_stat_t));
while ((HDstat(greenlight, &statbuf) == -1) && loops < maxloop) {
if (!loops++) {
printf("Proc %d (%*s, %d): to debug, attach %d\n", mpi_rank, mpi_namelen, mpi_name, pid, pid);
}
printf("waiting(%ds) for file %s ...\n", time_int, greenlight);
fflush(stdout);
HDsleep(time_int);
while ((HDstat(greenlight, &statbuf) == -1) && loops < maxloop) {
if (!loops++) {
printf("Proc %d (%*s, %d): to debug, attach %d\n", mpi_rank, mpi_namelen, mpi_name, pid, pid);
}
printf("waiting(%ds) for file %s ...\n", time_int, greenlight);
fflush(stdout);
HDsleep(time_int);

memset(&statbuf, 0, sizeof(h5_stat_t));
memset(&statbuf, 0, sizeof(h5_stat_t));
}
}
MPI_Barrier(MPI_COMM_WORLD);
}
Expand Down

0 comments on commit 685f817

Please sign in to comment.