Question

I'm trying to parallelize my code, and I'm using a CGAL's AABB tree for interference detection (pretty neat efficiency btw :) ). No problem on a single machine (I'm not saying it's multi-threaded, but that's another story), but I now want to do several analyses at once, and I'm going to use MPI to spawn my software onto several computers. The obstacle(s) do not change in the different analyses, my AABB tree is thus identical for all children. To minimize the overhead, I'd like to avoid re-reading and re-building my tree, and actually, not even a write file/read file operation.

Through the MPI function's SPAWN, I can give an array of strings to the child, and I'd like to pass the AABB tree along with the other global variables as arguments to skip the reading file part of the overhead.

1st question: That would mean passing something like 1.5MB+ in argv, anything wrong with that?

2nd question: How do I pass the tree? I read something interesting in this thread but it's old, and there is no follow up. Is there anyone who did the serialization in the meantime? Is there any new instruction to do it? Else I'll try to do such a function, at least in my case (ie, Simple_cartesian kernel, Triangle_3 primitives). Any help welcomed :)

Was it helpful?

Solution

Unfortunately, the answer in the thread you quoted is still valid: CGAL does not offer anything to help the serialization of an AABB Tree. What type of primitive do you have in your AABB Tree?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top