diff options
Diffstat (limited to 'examples/ph5example.c')
-rw-r--r-- | examples/ph5example.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/examples/ph5example.c b/examples/ph5example.c index e0fc644..5ec2cdc 100644 --- a/examples/ph5example.c +++ b/examples/ph5example.c @@ -46,23 +46,25 @@ /* Define some handy debugging shorthands, routines, ... */ /* debugging tools */ #define MESG(x) \ - if (verbose) \ - printf("%s\n", x); + do { \ + if (verbose) \ + printf("%s\n", x); \ + } while (0) #define MPI_BANNER(mesg) \ - { \ + do { \ printf("--------------------------------\n"); \ printf("Proc %d: ", mpi_rank); \ printf("*** %s\n", mesg); \ printf("--------------------------------\n"); \ - } + } while (0) #define SYNC(comm) \ - { \ + do { \ MPI_BANNER("doing a SYNC"); \ MPI_Barrier(comm); \ MPI_BANNER("SYNC DONE"); \ - } + } while (0) /* End of Define some handy debugging shorthands, routines, ... */ /* Constants definitions */ |