vtkProcessModuleConfiguration.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-License-Identifier: BSD-3-Clause
11 #ifndef vtkProcessModuleConfiguration_h
12 #define vtkProcessModuleConfiguration_h
13 
14 #include "vtkLogger.h" // for vtkLogger::Verbosity
15 #include "vtkObject.h"
16 #include "vtkProcessModule.h" // for vtkProcessModule::ProcessTypes
17 #include "vtkRemotingCoreModule.h" //needed for exports
18 
19 #include <string> // for std::string
20 #include <vector> // for std::vector
21 
22 class vtkCLIOptions;
23 
25 {
26 public:
28  void PrintSelf(ostream& os, vtkIndent indent) override;
29 
33  static vtkProcessModuleConfiguration* GetInstance();
34 
39  vtkGetMacro(ForceMPIInit, bool);
40 
45  vtkGetMacro(ForceNoMPIInit, bool);
46 
51  vtkGetMacro(UseMPISSend, bool);
52 
58  vtkGetMacro(SymmetricMPIMode, bool);
59 
64  vtkSetMacro(SymmetricMPIMode, bool);
65 
71  vtkGetMacro(LogStdErrVerbosity, vtkLogger::Verbosity);
72 
78  std::string GetCSLogFileName() const;
79 
84  vtkGetMacro(EnableStackTrace, bool);
85 
89  const std::vector<std::pair<std::string, vtkLogger::Verbosity>>& GetLogFiles() const
90  {
91  return this->LogFiles;
92  }
93 
99  bool PopulateOptions(vtkCLIOptions* options, vtkProcessModule::ProcessTypes processType);
100 
106  static std::string GetRankAnnotatedFileName(const std::string& fname);
107 
108 protected:
110  ~vtkProcessModuleConfiguration() override;
111 
112 private:
114  void operator=(const vtkProcessModuleConfiguration&) = delete;
115 
116  bool ForceMPIInit = false;
117  bool ForceNoMPIInit = false;
118  bool UseMPISSend = false;
119  bool SymmetricMPIMode = false;
120  bool EnableStackTrace = false;
121  vtkLogger::Verbosity LogStdErrVerbosity = vtkLogger::VERBOSITY_INVALID;
122  std::string CSLogFileName;
123  std::vector<std::pair<std::string, vtkLogger::Verbosity>> LogFiles;
125 };
126 
127 #endif
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
command line options manager
Definition: vtkCLIOptions.h:46
const std::vector< std::pair< std::string, vtkLogger::Verbosity > > & GetLogFiles() const
Returns a vector of pairs for log files requested.
#define VTKREMOTINGCORE_EXPORT
runtime configuration for vtkProcessModule
static vtkObject * New()
void operator=(const vtkObjectBase &)