<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">that could be a fine solution if you're
      not overly concerned about portability. if you did that then you
      might have to use mpiexec(or whatever launcher) to start the
      paraview client. (but mpich and openmpi seem to be fine without
      mpiexec for 1 process runs...ymmv) you'd also be prevented from
      running the client on login nodes at certain hpc sites.<br>
      <br>
      but wait a second...<br>
      <blockquote type="cite"> Just enabling the Multi-Core option in
        the ParaView settings does not seem to do the trick.</blockquote>
      I think that this should work. at least my reader which can't run
      without mpi works with it. Is this a recent version of ParaVIew?
      Are you sure you tried on an mpi endowed build? Once you check the
      multicore setting you need to restart paraview.<br>
      <br>
      <br>
      On 06/01/2013 03:20 PM, Biddiscombe, John A. wrote:<br>
    </div>
    <blockquote
      cite="mid:50320452A334BD42A5EC72BAD2145099085DD335@MBX10.d.ethz.ch"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=ISO-8859-1">
      <meta name="Generator" content="Microsoft Word 15 (filtered
        medium)">
      <style><!--
/* Font Definitions */
@font-face
        {font-family:Helvetica;
        panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";
        color:black;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
tt
        {mso-style-priority:99;
        font-family:"Courier New";}
span.apple-style-span
        {mso-style-name:apple-style-span;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:"Consolas","serif";
        color:black;}
span.EmailStyle21
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
      <div class="WordSection1">
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D;mso-fareast-language:EN-US">Michael,<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D;mso-fareast-language:EN-US"><o:p>&nbsp;</o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D;mso-fareast-language:EN-US">I
            had&nbsp; the same problem with a plugin of mine, so I added some
            code to call mpi init in the client,<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D;mso-fareast-language:EN-US">Have
            a look at this patch. I can&#8217;t remember why I put in an
            #ifdef win32 now, (maybe because I usually run the gui on
            windows and the servers on the cray and probably it needed a
            tweak on linux&#8230;)<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D;mso-fareast-language:EN-US"><a
              moz-do-not-send="true"
href="https://github.com/biddisco/ParaView/commit/10e4affe2d7a4736d05d1d14cfaffc996c227649">https://github.com/biddisco/ParaView/commit/10e4affe2d7a4736d05d1d14cfaffc996c227649</a><o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D;mso-fareast-language:EN-US"><o:p>&nbsp;</o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D;mso-fareast-language:EN-US">note
            also I needed thread multiple, so you might be able to
            simplify it slightly.<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D;mso-fareast-language:EN-US"><o:p>&nbsp;</o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D;mso-fareast-language:EN-US">This
            patch might be obsolete, because I think I found a way of
            doing it inside the plugin&#8230;[pause] &#8230; no in the plugin I swap
            the global communicator from a dummycontroller to a true mpi
            controller. Try this patch and if it doesn&#8217;t work I&#8217;ll point
            you to my plugin tweaks.<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D;mso-fareast-language:EN-US"><o:p>&nbsp;</o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D;mso-fareast-language:EN-US">JB<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D;mso-fareast-language:EN-US"><o:p>&nbsp;</o:p></span></p>
        <div>
          <div style="border:none;border-top:solid #E1E1E1
            1.0pt;padding:3.0pt 0cm 0cm 0cm">
            <p class="MsoNormal"><b><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:windowtext"
                  lang="EN-US">From:</span></b><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:windowtext"
                lang="EN-US"> <a class="moz-txt-link-abbreviated" href="mailto:paraview-developers-bounces@paraview.org">paraview-developers-bounces@paraview.org</a>
                [<a class="moz-txt-link-freetext" href="mailto:paraview-developers-bounces@paraview.org">mailto:paraview-developers-bounces@paraview.org</a>] <b>On
                  Behalf Of </b>burlen<br>
                <b>Sent:</b> 01 June 2013 19:19<br>
                <b>To:</b> Michael Schlottke<br>
                <b>Cc:</b> ParaView Developers<br>
                <b>Subject:</b> Re: [Paraview-developers] ParaView
                plugins with MPI only on client<o:p></o:p></span></p>
          </div>
        </div>
        <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
        <div>
          <p class="MsoNormal">Hi Micheal,<br>
            <br>
            I think you better let ParaView start MPI. There is a method
            that every reader should implement called CanReadFile. If
            you're reader cannot run with out MPI then in CanReadFile
            you should check if MPI is initialized and if not then you
            should return false. Then ParaView will not attempt to use
            your reader. This will avoid crashes when you are not
            running in client server mode. Something like this...<br>
            <br>
            <tt><span style="font-size:10.0pt">276
//-----------------------------------------------------------------------------</span></tt><span
              style="font-size:10.0pt;font-family:&quot;Courier
              New&quot;"><br>
              <tt>277 int vtkSQBOVReaderBase::CanReadFile(const char
                *file)</tt><br>
              <tt>278 {</tt><br>
              <tt>279&nbsp;&nbsp; #if defined SQTK_DEBUG</tt><br>
              <tt>280&nbsp;&nbsp; pCerr() &lt;&lt;
                "=====vtkSQBOVReaderBase::CanReadFile" &lt;&lt; endl;</tt><br>
              <tt>281&nbsp;&nbsp; pCerr() &lt;&lt; "Check " &lt;&lt; safeio(file)
                &lt;&lt; "." &lt;&lt; endl;</tt><br>
              <tt>282&nbsp;&nbsp; #endif</tt><br>
              <tt>283</tt><br>
              <tt>284&nbsp;&nbsp; int status=0;</tt><br>
              <tt>285</tt><br>
              <tt>286&nbsp;&nbsp; #ifdef SQTK_WITHOUT_MPI</tt><br>
              <tt>287&nbsp;&nbsp; (void)file;</tt><br>
              <tt>288&nbsp;&nbsp; #else</tt><br>
              <tt>289&nbsp;&nbsp; // first check that MPI is initialized. in
                builtin mode MPI will</tt><br>
              <tt>290&nbsp;&nbsp; // never be initialized and this reader will be
                unable to read files</tt><br>
              <tt>291&nbsp;&nbsp; // so we always return false in this case</tt><br>
              <tt>292&nbsp;&nbsp; int mpiOk=0;</tt><br>
              <tt>293&nbsp;&nbsp; MPI_Initialized(&amp;mpiOk);</tt><br>
              <tt>294&nbsp;&nbsp; if (!mpiOk)</tt><br>
              <tt>295&nbsp;&nbsp;&nbsp;&nbsp; {</tt><br>
              <tt>296&nbsp;&nbsp;&nbsp;&nbsp; return 0;</tt><br>
              <tt>297&nbsp;&nbsp;&nbsp;&nbsp; }</tt><br>
              <tt>298</tt><br>
              <tt>299&nbsp;&nbsp; // only rank 0 opens the file, this results in
                metadata</tt><br>
              <tt>300&nbsp;&nbsp; // being parsed. If the parsing of md is
                successful then</tt><br>
              <tt>301&nbsp;&nbsp; // the file is ours.</tt><br>
              <tt>302&nbsp;&nbsp;
                this-&gt;Reader-&gt;SetCommunicator(MPI_COMM_SELF);</tt><br>
              <tt>303&nbsp;&nbsp; status=this-&gt;Reader-&gt;Open(file);</tt><br>
              <tt>304&nbsp;&nbsp; this-&gt;Reader-&gt;Close();</tt><br>
              <tt>305&nbsp;&nbsp; #endif</tt><br>
              <tt>306</tt><br>
              <tt>307&nbsp;&nbsp; return status;</tt><br>
              <tt>308 }</tt></span><br>
            <br>
            Of course if ParaView is built without MPI then you should
            always return false. An even better solution is to structure
            your reader to work both with and without mpi. I know it's
            doable if you're using unidata netcdf ver 4, not so sure
            about pnetcdf...<br>
            <br>
            Burlen <br>
            <br>
            On 06/01/2013 08:15 AM, Michael Schlottke wrote:<o:p></o:p></p>
        </div>
        <blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
          <p class="MsoNormal">Hi, <o:p></o:p></p>
          <div>
            <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
          </div>
          <div>
            <p class="MsoNormal">for one of our own ParaView reader
              plugins we rely on Parallel NetCDF (pnetcdf) to do read in
              data in parallel, which in turn uses MPI to do the
              parallel I/O. Principally our reading algorithm works with
              any number of processes, including one.<o:p></o:p></p>
          </div>
          <div>
            <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
          </div>
          <div>
            <p class="MsoNormal">At the moment, we always have to start
              a pvserver instance with MPI (i.e. mpiexec -n NN
              pvserver), start a normal client, and connect to the
              pvserver instance if we want to use the plugin - this also
              works for NN=1. However, when I start the ParaView client,
              the plugin crashes because MPI was not loaded/started.
              Thus we always have to go through the extra steps of
              starting a pvserver if we want to use the plugin.<o:p></o:p></p>
          </div>
          <div>
            <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
          </div>
          <div>
            <p class="MsoNormal">Thus my question is whether there is a
              way to either start/load MPI manually from the plugin, or
              if it is possible to configure the client to automatically
              load and start the MPI library? Just enabling the
              Multi-Core option in the ParaView settings does not seem
              to do the trick.<o:p></o:p></p>
          </div>
          <div>
            <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
          </div>
          <div>
            <p class="MsoNormal">Regards,<o:p></o:p></p>
          </div>
          <div>
            <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
          </div>
          <div>
            <p class="MsoNormal">Michael<o:p></o:p></p>
          </div>
          <p class="MsoNormal" style="margin-bottom:12.0pt"><o:p>&nbsp;</o:p></p>
          <div>
            <div>
              <div>
                <div>
                  <div>
                    <div>
                      <div>
                        <div>
                          <div>
                            <div>
                              <div>
                                <div>
                                  <p class="MsoNormal"><span
style="font-size:13.5pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;">--<o:p></o:p></span></p>
                                </div>
                                <div>
                                  <p class="MsoNormal"><span
style="font-size:13.5pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;">Michael
                                      Schlottke<o:p></o:p></span></p>
                                </div>
                                <div>
                                  <p class="MsoNormal"><span
style="font-size:13.5pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;"><o:p>&nbsp;</o:p></span></p>
                                </div>
                                <div>
                                  <p class="MsoNormal"><span
style="font-size:13.5pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;">SimLab
                                      Highly Scalable Fluids &amp;
                                      Solids Engineering<o:p></o:p></span></p>
                                </div>
                                <div>
                                  <p class="MsoNormal"><span
style="font-size:13.5pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;">J&uuml;lich
                                      Aachen Research Alliance
                                      (JARA-HPC)<o:p></o:p></span></p>
                                </div>
                                <div>
                                  <p class="MsoNormal"><span
style="font-size:13.5pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;">RWTH
                                      Aachen University<o:p></o:p></span></p>
                                </div>
                                <div>
                                  <p class="MsoNormal"><span
style="font-size:13.5pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;">W&uuml;llnerstra&szlig;e
                                      5a<br>
                                      52062 Aachen<br>
                                      Germany<o:p></o:p></span></p>
                                </div>
                                <div>
                                  <p class="MsoNormal"><span
style="font-size:13.5pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;"><o:p>&nbsp;</o:p></span></p>
                                </div>
                                <div>
                                  <p class="MsoNormal"><span
style="font-size:13.5pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;">Phone:
                                      +49 (241) 80 95188<o:p></o:p></span></p>
                                </div>
                                <div>
                                  <p class="MsoNormal"><span
style="font-size:13.5pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;">Fax:
                                      +49 (241) 80 92257<o:p></o:p></span></p>
                                </div>
                                <div>
                                  <p class="MsoNormal"><span
style="font-size:13.5pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;">Mail:
                                      <a moz-do-not-send="true"
                                        href="mailto:m.schlottke@aia.rwth-aachen.de">m.schlottke@aia.rwth-aachen.de</a><o:p></o:p></span></p>
                                </div>
                                <div>
                                  <p class="MsoNormal"><span
style="font-size:13.5pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;">Web:&nbsp;<a
                                        moz-do-not-send="true"
                                        href="http://www.jara.org/jara-hpc">http://www.jara.org/jara-hpc</a><o:p></o:p></span></p>
                                </div>
                              </div>
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
          <p class="MsoNormal"><br>
            <br>
            <br>
            <br>
            <o:p></o:p></p>
          <pre>_______________________________________________<o:p></o:p></pre>
          <pre>Paraview-developers mailing list<o:p></o:p></pre>
          <pre><a moz-do-not-send="true" href="mailto:Paraview-developers@paraview.org">Paraview-developers@paraview.org</a><o:p></o:p></pre>
          <pre><a moz-do-not-send="true" href="http://public.kitware.com/mailman/listinfo/paraview-developers">http://public.kitware.com/mailman/listinfo/paraview-developers</a><o:p></o:p></pre>
        </blockquote>
        <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
      </div>
    </blockquote>
    <br>
  </body>
</html>