VTK  9.3.20240419
vtkMPIUtilities.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
3 #ifndef vtkMPIUtilities_h
4 #define vtkMPIUtilities_h
5 
6 #include "vtkParallelMPIModule.h" // For export macro
7 
8 // Forward declarations
9 VTK_ABI_NAMESPACE_BEGIN
10 class vtkMPIController;
11 VTK_ABI_NAMESPACE_END
12 
13 namespace vtkMPIUtilities
14 {
15 VTK_ABI_NAMESPACE_BEGIN
16 
17 // Description:
18 // Rank 0 prints the user-supplied formatted message to stdout.
19 // This method works just like printf, but, requires an additional
20 // argument to specify the MPI controller for the application.
21 // NOTE: This is a collective operation, all ranks in the given communicator
22 // must call this method.
23 VTKPARALLELMPI_EXPORT
24 void Printf(vtkMPIController* comm, const char* format, ...);
25 
26 // Description:
27 // Each rank, r_0 to r_{N-1}, prints the formatted message to stdout in
28 // rank order. That is, r_i prints the supplied message right after r_{i-1}.
29 // NOTE: This is a collective operation, all ranks in the given communicator
30 // must call this method.
31 VTKPARALLELMPI_EXPORT
32 void SynchronizedPrintf(vtkMPIController* comm, const char* format, ...);
33 
34 VTK_ABI_NAMESPACE_END
35 } // END namespace vtkMPIUtilities
36 
37 #endif // vtkMPIUtilities_h
38 // VTK-HeaderTest-Exclude: vtkMPIUtilities.h
Process communication using MPI.
VTKPARALLELMPI_EXPORT void Printf(vtkMPIController *comm, const char *format,...)
VTKPARALLELMPI_EXPORT void SynchronizedPrintf(vtkMPIController *comm, const char *format,...)