vtkProcessModuleAutoMPI.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkProcessModuleAutoMPI.h
5 
6  Copyright (c) Kitware, Inc.
7  All rights reserved.
8  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
15 #ifndef vtkProcessModuleAutoMPI_h
16 #define vtkProcessModuleAutoMPI_h
17 
18 #include "vtkClientServerID.h" // needed for UniqueID.
19 #include "vtkObject.h"
20 #include "vtkRemotingCoreModule.h" //needed for exports
21 
22 class vtkProcessModuleAutoMPIInternals;
24 {
25 public:
26  static vtkProcessModuleAutoMPI* New();
28  void PrintSelf(ostream& os, vtkIndent indent) override;
29 
30  static bool EnableAutoMPI;
31  static int NumberOfCores;
32  static void SetEnableAutoMPI(bool val);
33  static void SetNumberOfCores(int val);
34 
36  ~vtkProcessModuleAutoMPI() override;
37 
38  // Description:
39  // To determine if it is possible to use multi-core on the system.
40  // It returns 1 if possible and 0 if not.
41  int IsPossible();
42 
43  // Description:
44  // This method is called if the system running paraview has
45  // multicores. When called the systems starts N pvservers on MPI
46  // where N is the total number of cores available. The method first
47  // scans for an available free port and starts the server on that
48  // port. The port over which the connection is made is returned for
49  // the client to consequently connect to it. Returns 0 on failure.
50  int ConnectToRemoteBuiltInSelf();
51 
52 private:
54  void operator=(const vtkProcessModuleAutoMPI&) = delete;
55  vtkProcessModuleAutoMPIInternals* Internals;
56 };
57 
58 #endif /* !vtkProcessModuleAutoMPI_h */
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
#define VTKREMOTINGCORE_EXPORT
static vtkObject * New()
void operator=(const vtkObjectBase &)