27#ifndef _SMESH_PARALLELMESH_HXX_
28#define _SMESH_PARALLELMESH_HXX_
33#include <boost/asio.hpp>
40#include <boost/filesystem.hpp>
49 bool theIsEmbeddedMode,
56 void Lock()
override {_my_lock.lock();};
57 void Unlock()
override {_my_lock.unlock();};
59 void wait()
override {_pool->join(); DeletePoolThreads(); InitPoolThreads(); };
64 void InitPoolThreads() {_pool =
new boost::asio::thread_pool(GetPoolNbThreads());};
65 boost::asio::thread_pool*
GetPool() {
return _pool;};
68 void InitPoolThreads() {};
69 void* GetPool() {
return NULL;};
70 void DeletePoolThreads(){};
73 int GetPoolNbThreads();
76 bool keepingTmpFolfer();
77 void CreateTmpFolder();
78 void DeleteTmpFolder();
96 void SetNbThreads(
long nbThreads);
112 void SetWcKey(std::string wcKey) {_wcKey = wcKey;};
121 const TopoDS_Shape & aShape,
124 TopTools_IndexedMapOfShape* allowedSubShapes,
126 const bool includeSelf,
127 const bool complexShapeFirst,
128 const bool aShapeOnly)
override;
138 boost::asio::thread_pool * _pool =
nullptr;
144 int _NbThreads = std::thread::hardware_concurrency();
147 int _nbProcPerNode = 1;
149 std::string _resource =
"";
150 std::string _wcKey =
"P11N0:SALOME";
151 std::string _walltime =
"01:00:00";
std::set< int > TSetOfInt
Definition: SMESH_Gen.hxx:65
MeshDimension
Definition: SMESH_Hypothesis.hxx:40
ParallelismMethod
Definition: SMESH_ParallelMesh.hxx:42
@ MultiNode
Definition: SMESH_ParallelMesh.hxx:42
@ MultiThread
Definition: SMESH_ParallelMesh.hxx:42
#define SMESH_EXPORT
Definition: SMESH_SMESH.hxx:37
Definition: SMESHDS_Document.hxx:38
Definition: SMESH_Gen.hxx:68
Definition: SMESH_Mesh.hxx:80
virtual bool ComputeSubMeshes(SMESH_Gen *gen, SMESH_Mesh &aMesh, const TopoDS_Shape &aShape, const ::MeshDimension aDim, TSetOfInt *aShapesId, TopTools_IndexedMapOfShape *allowedSubShapes, SMESH_subMesh::compute_event &computeEvent, const bool includeSelf, const bool complexShapeFirst, const bool aShapeOnly)
Definition: SMESH_Mesh.hxx:410
virtual int GetParallelElement()
Definition: SMESH_Mesh.hxx:408
Definition: SMESH_ParallelMesh.hxx:45
void wait() override
Definition: SMESH_ParallelMesh.hxx:59
void SetNbProcPerNode(long nbProcPerNodes)
Definition: SMESH_ParallelMesh.hxx:106
void SetResource(std::string aResource)
Definition: SMESH_ParallelMesh.hxx:100
int GetParallelismDimension()
Definition: SMESH_ParallelMesh.hxx:91
void SetWcKey(std::string wcKey)
Definition: SMESH_ParallelMesh.hxx:112
void SetNbProc(long nbProc)
Definition: SMESH_ParallelMesh.hxx:103
int GetNbThreads()
Definition: SMESH_ParallelMesh.hxx:95
int GetNbProcPerNode()
Definition: SMESH_ParallelMesh.hxx:105
boost::filesystem::path tmp_folder
Definition: SMESH_ParallelMesh.hxx:140
boost::mutex _my_lock
Definition: SMESH_ParallelMesh.hxx:136
bool IsParallel() override
Definition: SMESH_ParallelMesh.hxx:83
SMESH_ParallelMesh(const SMESH_ParallelMesh &aMesh)
Definition: SMESH_ParallelMesh.hxx:132
int GetNbProc()
Definition: SMESH_ParallelMesh.hxx:102
boost::asio::thread_pool * GetPool()
Definition: SMESH_ParallelMesh.hxx:65
boost::filesystem::path GetTmpFolder()
Definition: SMESH_ParallelMesh.hxx:79
int GetNbNode()
Definition: SMESH_ParallelMesh.hxx:108
SMESH_ParallelMesh()
Definition: SMESH_ParallelMesh.hxx:131
void InitPoolThreads()
Definition: SMESH_ParallelMesh.hxx:64
void SetWalltime(std::string walltime)
Definition: SMESH_ParallelMesh.hxx:115
void SetNbNode(long nbNodes)
Definition: SMESH_ParallelMesh.hxx:109
std::string GetResource()
Definition: SMESH_ParallelMesh.hxx:99
std::string GetWalltime()
Definition: SMESH_ParallelMesh.hxx:114
void SetParallelismDimension(int aDim)
Definition: SMESH_ParallelMesh.hxx:92
std::string GetWcKey()
Definition: SMESH_ParallelMesh.hxx:111
void Lock() override
Definition: SMESH_ParallelMesh.hxx:56
void DeletePoolThreads()
Definition: SMESH_ParallelMesh.hxx:66
void Unlock() override
Definition: SMESH_ParallelMesh.hxx:57
void SetParallelismMethod(int aMethod)
Definition: SMESH_ParallelMesh.hxx:89
int GetParallelismMethod()
Definition: SMESH_ParallelMesh.hxx:88
compute_event
Definition: SMESH_subMesh.hxx:116