Open CASCADE, the 3D modelling kernel
3D modeling & numerical simulation

Search the Forums
See All Topics
 

MPI Serialization to memory block

MPI Serialization to memory block
AlexChuprunov 2012/09/25 12:56
Dear collegues!

I have a parallel MPI code that implements Master-Slave approach.
MPI Master reads geometry from BREP file and must send it to MPI Slaves. How can I obtain a single memory block (with whole geometry description)to send it using MPI_Send command?
I need the same geometry on all MPI Slaves.
Roman Lygin 2012/09/25 14:38
Hi Alex,

I used to think about similar usage model but it always fell below my priority line. Here are some draft thoughts I had, may be will be helpful for you:

1. Just save a .brep file on a shared drive in the master process and read it in all slaves.
2. Save in a string buffer in memory. Create a stream over that buffer and use BRepTools::Write(stream). Then send that string buffer. Read from the received buffer in each slave process.
3. Check the Serialization sample that used to exist in Open CASCADE distribution. I don't remember by heart what it was really about and how it is different from the CSFDB support in import/export example (see ./samples/mfc/Common/ImportExport/ImportExport.cpp CImportExport::SaveCSFDB())
4. Design custom serialization. This will be unavoidable if you need to send some custom data model, not just TopoDS_Shape. Anyway, BRepTools_ShapeSet, etc used by BRepTools::Write()/Read() provide indexing of subshapes, so this should be feasible.

If you end up with some implementation, please share your findings.
Good luck.
Roman
 
 
Latest news
  • Open CASCADE Technology 6.8.0 is available for download!
  • New features to enhance the development process
  • Open CASCADE Technology 6.7.1 is available for download!

  • © OPEN CASCADE 2000 - 2014  |  Search  |  Contacts   |  Site map