VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkMPIUtilities.h 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00015 #ifndef __vtkMPIUtilities_h 00016 #define __vtkMPIUtilities_h 00017 00018 #include "vtkParallelMPIModule.h" // For export macro 00019 00020 // Forward declarations 00021 class vtkMPIController; 00022 00023 namespace vtkMPIUtilities 00024 { 00025 00026 // Description: 00027 // Rank 0 prints the user-supplied formatted message to stdout. 00028 // This method works just like printf, but, requires an additional 00029 // argument to specify the MPI controller for the application. 00030 // NOTE: This is a collective operation, all ranks in the given communicator 00031 // must call this method. 00032 VTKPARALLELMPI_EXPORT 00033 void Printf(vtkMPIController* comm, const char* format, ...); 00034 00035 // Description: 00036 // Each rank, r_0 to r_{N-1}, prints the formatted message to stdout in 00037 // rank order. That is, r_i prints the supplied message right after r_{i-1}. 00038 // NOTE: This is a collective operation, all ranks in the given communicator 00039 // must call this method. 00040 VTKPARALLELMPI_EXPORT 00041 void SynchronizedPrintf(vtkMPIController* comm, const char* format, ...); 00042 00043 } // END namespace vtkMPIUtilities 00044 00045 #endif // __vtkMPIUtilities_h 00046 // VTK-HeaderTest-Exclude: vtkMPIUtilities.h