Subject: CGAL users discussion list
List archive
- From: Michael Bieri <>
- To:
- Subject: Re: [cgal-discuss] 3D Mesh Generation: How to enable parallel meshing
- Date: Thu, 17 Aug 2017 13:00:12 +0200
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=Pass ; spf=None
- Ironport-phdr: 9a23:tvIExhU9ObrPEbyVMcS3vtof5HrV8LGtZVwlr6E/grcLSJyIuqrYZhWGt8tkgFKBZ4jH8fUM07OQ6P+wHzFYqb+681k8M7V0HycfjssXmwFySOWkMmbcaMDQUiohAc5ZX0Vk9XzoeWJcGcL5ekGA6ibqtW1aSV3CMxFoLLH1BpLKlJbwkPuj/oXaJQROnju0J71oaw6nqB3Y8cgQj4wlIak4zl7Fo2BDZv9Nll9vcFmclhK56sar94N46AxRvegg/ohOS/bUZaM9GJlZBzQvPmR9zszmrxiLGQ6O7HoRSGQ+nR9BAgyD5xb/CMSi+hDmv/ZwjXHJdfb9Sqo5DGyv
Hi again,
Thanks Sebastian for your answer.
I finally managed to make it work. I'll describe what I did and I also have some questions about it:
- The cgal_create_cmake_script and cgal_create_CMakeLists do not create any TBB-related code, at all, never. Is that correct?
- So I had to merge the TBB-related stuff from your above linked CMakeLists into the CMakeLists of my project.
- Compiling TBB is easy, BUT it does not offer any installation routine. So I had to specify all TBB_* variables in my project with ccmake or -D... manually. Or does CGAL/TBB offer anything to automatically detect those variables?
- Once it compiled, the meshing will run with a reasonable number of threads right away. Or should I configure something manually?
Best regards,
Michael
On Thu, Aug 17, 2017 at 9:02 AM, Sebastien Loriot (GeometryFactory) <> wrote:
On 08/16/2017 12:17 PM, Michael Bieri wrote:
Hi all
The CGAL documentation just says that I have to enable the parallel tag,
like:
typedef CGAL::Parallel_tag Concurrency_tag;
typedef
CGAL::Mesh_triangulation_3<Mesh_domain,CGAL::Default,Concurrency_tag>::type
Tr;
Surprisingly, it compiled right after that modification, even though I
neither set any link flags for the Intel TBB nor did I find any traces
that I already have Intel TBB on my system (Mac Book Pro) at all.
If you copy-paste a cmake script from CGAL it might be automatically
done. I know this a proposal to issue a warning when the user ask
for parallel support while it is not available but it was not
implemented IIRC. One way to check is to verify that
CGAL_LINKED_WITH_TBB is defined.
Otherwise have a look at this cmake script for example:
https://github.com/CGAL/cgal/blob/master/Mesh_3/examples/Mesh_3/CMakeLists.txt
What exactly do I need to do to use parallel meshing? How can I control
the number of threads? Is there an example?
You should refer to the Intel TBB documentation.
Something like this should work:
{
tbb::task_scheduler_init tsi(6); // 6 threads
run_parallel_algo1(); // Uses 6 threads
}
Sebastien.--
Thanks a lot and best regards,
Michael
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss
- [cgal-discuss] 3D Mesh Generation: How to enable parallel meshing, Michael Bieri, 08/16/2017
- Re: [cgal-discuss] 3D Mesh Generation: How to enable parallel meshing, Sebastien Loriot (GeometryFactory), 08/17/2017
- Re: [cgal-discuss] 3D Mesh Generation: How to enable parallel meshing, Michael Bieri, 08/17/2017
- Re: [cgal-discuss] 3D Mesh Generation: How to enable parallel meshing, Sebastien Loriot (GeometryFactory), 08/17/2017
- Re: [cgal-discuss] 3D Mesh Generation: How to enable parallel meshing, Michael Bieri, 08/17/2017
- Re: [cgal-discuss] 3D Mesh Generation: How to enable parallel meshing, Sebastien Loriot (GeometryFactory), 08/17/2017
Archive powered by MHonArc 2.6.18.