Zoltan_Print_Sync_Start / Zoltan_Print_Sync_End: provide synchronization of processors for I/O (with example).
Zoltan_Print_Stats : print statistics about a parallel variable.
The Zoltan_Print_Sync_Start function is adapted from work of John Shadid for the MPSalsa project at Sandia National Laboratories. With Zoltan_Print_Sync_End, it provides synchronization so that one processor in the Zoltan communicator can complete its I/O before the next processor begins its I/O. This synchronization utility is useful for debugging algorithms, as it allows the output from processors to be produced in an organized manner. It is, however, a serializing process, and thus, does not scale well to large number of processors.
Zoltan_Print_Sync_Start should called by each processor in the MPI
communicator before the desired I/O is performed. Zoltan_Print_Sync_End
is called by each processor after the I/O is performed. No communication
can be performed between calls to Zoltan_Print_Sync_Start and Zoltan_Print_Sync_End.
See the example below for usage of Zoltan_Print_Sync_Start.
Arguments: | |
communicator | The MPI communicator containing all processors to participate in the synchronization. |
do_print_line | A flag indicating whether to print a line of "#" characters before and after the synchronization block. If do_print_line is TRUE, a line is printed; no line is printed otherwise. |
The Zoltan_Print_Sync_End function is adapted from work of John Shadid for the MPSalsa project at Sandia National Laboratories. With Zoltan_Print_Sync_Start, it provides synchronization so that one processor in the Zoltan communicator can complete its I/O before the next processor begins its I/O. This synchronization utility is useful for debugging algorithms, as it allows the output from processors to be produced in an organized manner. It is, however, a serializing process, and thus, does not scale well to large number of processors.
Zoltan_Print_Sync_Start should
called by each processor in the MPI communicator before the desired I/O
is performed. Zoltan_Print_Sync_End is called by each processor after
the I/O is performed. No communication can be performed between calls to
Zoltan_Print_Sync_Start and Zoltan_Print_Sync_End.
See the example below for usage of Zoltan_Print_Sync_End.
Arguments: | |
communicator | The MPI communicator containing all processors to participate in the synchronization. |
do_print_line | A flag indicating whether to print a line of "#" characters before and after the synchronization block. If do_print_line is TRUE, a line is printed; no line is printed otherwise. |
Arguments: | |
comm | The MPI Communicator to be used in maximum and sum operations. |
debug_proc | The processor from which output should be printed. |
x | The variable of which one wishes to display statistics. |
msg | A string that typically describes the meaning of x. |
...
if (zz->Debug_Level >= ZOLTAN_DEBUG_ALL) { int i; Zoltan_Print_Sync_Start(zz->Communicator, TRUE); printf("Zoltan: Objects to be exported from Proc %d\n", zz->Proc); for (i = 0; i < *num_export_objs; i++) { printf(" Obj: "); ZOLTAN_PRINT_GID(zz, &((*export_global_ids)[i*zz->Num_GID])); printf(" Destination: %4d\n", (*export_procs)[i]); } Zoltan_Print_Sync_End(zz->Communicator, TRUE); } |