<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
Hi Sujin,
<div class=""><br class="">
</div>
<div class="">Thanks again for the fast and helpful answer! One last question: if I do not call vtkSMPTools::Initialize() and OMP_NUM_THREADS is not set, which number of threads will be used? Will it be the same as if running a normal OpenMP program with OMP_NUM_THREADS
not set or will a different value be used?</div>
<div class=""><br class="">
</div>
<div class="">Michael</div>
<div class=""><br class="">
<div>
<blockquote type="cite" class="">
<div class="">On 08 Mar 2016, at 15:22 , Sujin Philip <<a href="mailto:sujin.philip@kitware.com" class="">sujin.philip@kitware.com</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div dir="ltr" class="">
<div class="">
<div class="">
<div class="">Hi Michael,<br class="">
<br class="">
- What is the default SMP backend if I do not configure anything during ParaView compilation (I assume “Sequential”)?<br class="">
Sequential is the default backend.<br class="">
<br class="">
- With OpenMP, will I have to call vtkSMPTools::Initialize(nThreads) explicitly with nThreads determined by myself, or will it honor e.g. OMP_NUM_THREADS automatically?<br class="">
It is not necessary to call vtkSMPTools::Initialize. If initialize is not called and OMP_NUM_THREADS is set, it will be used.<br class="">
<br class="">
- Am I correct in the assumption that the backend type should not change the results, i.e. that on hosts where I do not know which SMP backend is configured, I can assume my algorithms “just work”?<br class="">
</div>
Yes, the different backends should produce the same results. The only noticeable difference should be in the performance. If the results are not the same then its a bug.<br class="">
<br class="">
</div>
Thanks<br class="">
</div>
Sujin<br class="">
<br class="">
<div class="">
<div class="">
<div class="">
<div class="gmail_extra"><br class="">
<div class="gmail_quote">On Tue, Mar 8, 2016 at 9:08 AM, Schlottke-Lakemper, Michael
<span dir="ltr" class=""><<a href="mailto:m.schlottke-lakemper@aia.rwth-aachen.de" target="_blank" class="">m.schlottke-lakemper@aia.rwth-aachen.de</a>></span> wrote:<br class="">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Hi Utkarsh,<br class="">
<br class="">
Thanks for the fast answer. I have a a few follow-up questions, if I may:<br class="">
<br class="">
- What is the default SMP backend if I do not configure anything during ParaView compilation (I assume “Sequential”)?<br class="">
- With OpenMP, will I have to call vtkSMPTools::Initialize(nThreads) explicitly with nThreads determined by myself, or will it honor e.g. OMP_NUM_THREADS automatically?<br class="">
- If I have to call vtkSMPTools::Initialize(nThreads) explicitly, where should it be done in case of a plugin? In the plugin’s ctor, in the RequestData method, or someplace else?<br class="">
- Am I correct in the assumption that the backend type should not change the results, i.e. that on hosts where I do not know which SMP backend is configured, I can assume my algorithms “just work”?<br class="">
<br class="">
Thanks a lot in advance<br class="">
<span class=""><font color="#888888" class=""><br class="">
Michael<br class="">
</font></span>
<div class="">
<div class="h5"><br class="">
> On 08 Mar 2016, at 14:39 , Utkarsh Ayachit <<a href="mailto:utkarsh.ayachit@kitware.com" class="">utkarsh.ayachit@kitware.com</a>> wrote:<br class="">
><br class="">
> Michael,<br class="">
><br class="">
> The VTK-SMP approach is indeed the way to go for this. To make the<br class="">
> backend use OpenMP, you simply compile VTK/ParaView with<br class="">
> VTK_SMP_IMPLEMENTATION_TYPE set to OpenMP. The programming model<br class="">
> described in the SMP Guide PDF has been implemented for all supported<br class="">
> backends including OpenMP and TBB.<br class="">
><br class="">
> Utkarsh<br class="">
><br class="">
> On Tue, Mar 8, 2016 at 6:22 AM, Schlottke-Lakemper, Michael<br class="">
> <<a href="mailto:m.schlottke-lakemper@aia.rwth-aachen.de" class="">m.schlottke-lakemper@aia.rwth-aachen.de</a>> wrote:<br class="">
>> Hi everyone,<br class="">
>><br class="">
>> We have a custom parallel reader plugin that works well with our files even<br class="">
>> on large-ish (100-1000) number of cores for the pvserver. Recently we’ve<br class="">
>> added the capability to also create ghost cells with this reader such that<br class="">
>> MPI domain boundaries become transparent to filters that need neighbor data,<br class="">
>> e.g., for gradient computations. However, this ghost cell generation takes<br class="">
>> up quite some time, so we would like to keep the number of MPI ranks at a<br class="">
>> minimum and use hybrid MPI-OpenMP parallelism for our plugin.<br class="">
>><br class="">
>> My question is thus if it is possible to use OpenMP inside a custom plugin?<br class="">
>> And if yes, is there a canonical way to do it (maybe an example plugin) or<br class="">
>> is it going to be a hack?<br class="">
>><br class="">
>> When searching the interwebs for ParaView and OpenMP, I only came up with an<br class="">
>> old VTK mailing list thread from 2014<br class="">
>> (<a href="http://public.kitware.com/pipermail/vtkusers/2014-March/083399.html" rel="noreferrer" target="_blank" class="">http://public.kitware.com/pipermail/vtkusers/2014-March/083399.html</a>), in<br class="">
>> which David (DeMarle) refers to some initial documentation of the SMP<br class="">
>> framework (<a href="http://www.vtk.org/Wiki/images/3/3b/VTK_SMP_Guide.pdf" rel="noreferrer" target="_blank" class="">http://www.vtk.org/Wiki/images/3/3b/VTK_SMP_Guide.pdf</a>). However,<br class="">
>> the linked PDF does not contain references to OpenMP.<br class="">
>><br class="">
>> Thanks a lot in advance!<br class="">
>><br class="">
>> Michael<br class="">
>><br class="">
>> --<br class="">
>> Michael Schlottke-Lakemper<br class="">
>><br class="">
>> Chair of Fluid Mechanics and Institute of Aerodynamics<br class="">
>> RWTH Aachen University<br class="">
>> Wüllnerstraße 5a<br class="">
>> 52062 Aachen<br class="">
>> Germany<br class="">
>><br class="">
>> Phone: <a href="tel:%2B49%20%28241%29%2080%2095188" value="+492418095188" class="">
+49 (241) 80 95188</a><br class="">
>> Fax: <a href="tel:%2B49%20%28241%29%2080%2092257" value="+492418092257" class="">
+49 (241) 80 92257</a><br class="">
>> Mail: <a href="mailto:m.schlottke-lakemper@aia.rwth-aachen.de" class="">m.schlottke-lakemper@aia.rwth-aachen.de</a><br class="">
>> Web: <a href="http://www.aia.rwth-aachen.de/" rel="noreferrer" target="_blank" class="">
http://www.aia.rwth-aachen.de</a><br class="">
>><br class="">
>><br class="">
>> _______________________________________________<br class="">
>> Powered by <a href="http://www.kitware.com/" rel="noreferrer" target="_blank" class="">
www.kitware.com</a><br class="">
>><br class="">
>> Visit other Kitware open-source projects at<br class="">
>> <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank" class="">
http://www.kitware.com/opensource/opensource.html</a><br class="">
>><br class="">
>> Search the list archives at:<br class="">
>> <a href="http://markmail.org/search/?q=Paraview-developers" rel="noreferrer" target="_blank" class="">
http://markmail.org/search/?q=Paraview-developers</a><br class="">
>><br class="">
>> Follow this link to subscribe/unsubscribe:<br class="">
>> <a href="http://public.kitware.com/mailman/listinfo/paraview-developers" rel="noreferrer" target="_blank" class="">
http://public.kitware.com/mailman/listinfo/paraview-developers</a><br class="">
>><br class="">
<br class="">
_______________________________________________<br class="">
Powered by <a href="http://www.kitware.com/" rel="noreferrer" target="_blank" class="">
www.kitware.com</a><br class="">
<br class="">
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank" class="">
http://www.kitware.com/opensource/opensource.html</a><br class="">
<br class="">
Search the list archives at: <a href="http://markmail.org/search/?q=Paraview-developers" rel="noreferrer" target="_blank" class="">
http://markmail.org/search/?q=Paraview-developers</a><br class="">
<br class="">
Follow this link to subscribe/unsubscribe:<br class="">
<a href="http://public.kitware.com/mailman/listinfo/paraview-developers" rel="noreferrer" target="_blank" class="">http://public.kitware.com/mailman/listinfo/paraview-developers</a><br class="">
</div>
</div>
</blockquote>
</div>
<br class="">
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>