Subject: CGAL users discussion list
List archive
- From: "Sebastien Loriot (GeometryFactory)" <>
- To:
- Subject: Re: [cgal-discuss] 3D Mesh Generation: How to enable parallel meshing
- Date: Thu, 17 Aug 2017 13:48:09 +0200
- Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=Pass ; spf=None
- Ironport-phdr: 9a23:RKqmDxIMvBamxhgvudmcpTZWNBhigK39O0sv0rFitYgUKfvxwZ3uMQTl6Ol3ixeRBMOAtKIC1rKempujcFJDyK7JiGoFfp1IWk1NouQttCtkPvS4D1bmJuXhdS0wEZcKflZk+3amLRodQ56mNBWB6kC09iMYTxXjKRJudKOyAZ/Xl83x1uao+pSVbR8Pnyu4ebo1LRO4qkLaucASxIdjMa0s0QCannwdcOtfwSZkJEmYgg3nzsa25p9qtSpK6Nw78MsVG573da0jUb1VCnwCNHo049Gj9TbOSg6C+mENfGwdjh1SEkmPpEXhWpDrsyzm8O958CafNMzyC7szXGLxvO9QVBb0hXJfZHYC+2bNh5kogQ==
- Organization: GeometryFactory
On 08/17/2017 01:00 PM, Michael Bieri wrote:
Hi again,Yes.
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?
TBBROOT should be sufficient as documented here:
http://doc.cgal.org/latest/Manual/installation.html#title57
- Once it compiled, the meshing will run with a reasonable number of
threads right away. Or should I configure something manually?
This is handled by the default task scheduler created by TBB.
Look at TBB's doc for more info.
Sebastien.
Best regards,
Michael
On Thu, Aug 17, 2017 at 9:02 AM, Sebastien Loriot (GeometryFactory)
<
<mailto:>>
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
<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
<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.