<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Thanks for all the useful info, David, and Andy.<br>
<br>
After spending a lot of time looking into Cmake trace aLINK_SEARCH_END_STATICnd FindMPI.cmake, I finally resolved this problem by setting on LINK_SEARCH_START_STATIC and LINK_SEARCH_END_STATIC flags. Now the resulting executable is static and I can run in-situ
viz with our simulation on Titan. However, I don't see the slice images generated by Catalyst as set up in the python pipeline although the output message indicated that coprocessing was called and returned with no error. I am going to look into the code next
to investigate further, but a quick relevant question in my mind is: is this one static executable sufficient to run on the compute node or I have to copy over python modules and set python path appropriately for the pipeline to be executed by Catalyst?<br>
<br>
Thanks and regards,<br>
<br>
Hong<br>
<br>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div style="direction: ltr;" id="divRpF321139"><font color="#000000" face="Tahoma" size="2"><b>From:</b> Andy Bauer [andy.bauer@kitware.com]<br>
<b>Sent:</b> Thursday, September 12, 2013 6:07 PM<br>
<b>To:</b> David E DeMarle<br>
<b>Cc:</b> Hong Yi; paraview@paraview.org<br>
<b>Subject:</b> Re: [Paraview] Statically linking catalyst to fortran simulation code on Titan<br>
</font><br>
</div>
<div></div>
<div>
<div dir="ltr">If I remember correctly, FindMPI.cmake is trying to set the language specific libraries (e.g. MPI_CXX_LIBRARIES) and if those aren't set then it will try to find them and finally overwrite what is in MPI_LIBRARY. So I would suggest changing what
Dave D. suggested with MPI_{C,CXX,Fortran}_LIBRARIES set in addition to setting MPI_LIBRARY. If you look at FindMPI.cmake, you'll see that MPI_LIBRARY and MPI_EXTRA_LIBRARY are deprecated.
<br>
<br>
Andy<br>
</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">On Thu, Sep 12, 2013 at 5:33 PM, David E DeMarle <span dir="ltr">
<<a href="mailto:dave.demarle@kitware.com" target="_blank">dave.demarle@kitware.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
<div dir="ltr">They are overridden in the CMakeCache then? Ie you preset them and something later changes them.
<div><br>
</div>
<div>In situations like that cmake --trace is helpful. It tells cmake to spit out everything it does to the terminal. Pipe that into a file, and then grep the file for the cmake variable in question. You will be able to see what exactly set it incorrectly.</div>
<div><br>
</div>
<div>It will also be helpful to take a look at the FindMPI module itself, as that is the most likely culprit. By reading that it might become apparent.</div>
<div><br>
</div>
<div>good luck!</div>
<div><br>
</div>
<div class="gmail_extra">
<div class="im"><br clear="all">
<div>David E DeMarle<br>
Kitware, Inc.<br>
R&D Engineer<br>
21 Corporate Drive<br>
Clifton Park, NY 12065-8662<br>
Phone: <a href="tel:518-881-4909" value="+15188814909" target="_blank">518-881-4909</a></div>
<br>
<br>
</div>
<div>
<div class="h5">
<div class="gmail_quote">On Thu, Sep 12, 2013 at 5:26 PM, Hong Yi <span dir="ltr">
<<a href="mailto:hongyi@renci.org" target="_blank">hongyi@renci.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
<div lang="EN-US">
<div>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1f497d">Thanks for the info, David. I did try setting all these flags you indicated when building simulation code and Catalyst Fortran example code with CMake, but
it does not seem to help. Let me know if you have any other suggestions.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1f497d">Regards,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1f497d">Hong<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif""> David E DeMarle [mailto:<a href="mailto:dave.demarle@kitware.com" target="_blank">dave.demarle@kitware.com</a>]
<br>
<b>Sent:</b> Thursday, September 12, 2013 5:03 PM<br>
<b>To:</b> Hong Yi<br>
<b>Cc:</b> <a href="mailto:paraview@paraview.org" target="_blank">paraview@paraview.org</a><br>
<b>Subject:</b> Re: [Paraview] Statically linking catalyst to fortran simulation code on Titan<u></u><u></u></span></p>
<div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">I preset these config flags to make sure I got the static MPI libs.<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">list(APPEND PARAVIEW_OPTIONS "-DBUILD_SHARED_LIBS:BOOL=OFF")<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">list(APPEND PARAVIEW_OPTIONS "-DPARAVIEW_USE_MPI:BOOL=ON")<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">list(APPEND PARAVIEW_OPTIONS "-DMPI_INCLUDE_DIRS:STRING=/opt/cray/mpt/5.5.5/gni/mpich2-gnu/47/include")<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">list(APPEND PARAVIEW_OPTIONS "-DMPI_LIBRARY:FILEPATH=/opt/cray/mpt/5.5.5/gni/mpich2-gnu/47/lib/libmpich.a")<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">list(APPEND PARAVIEW_OPTIONS "-DMPI_EXTRA_LIBRARY:FILEPATH=/opt/cray/mpt/5.5.5/gni/mpich2-gnu/47/lib/libmpichcxx.a")<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">list(APPEND PARAVIEW_OPTIONS "-DVTK_USE_SYSTEM_HDF5:BOOL=1")<u></u><u></u></p>
</div>
</div>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">It is likely the case that presetting these in your simulation code will make it choose the right ones too:<u></u><u></u></p>
</div>
<div>
<div>
<p class="MsoNormal">list(APPEND PARAVIEW_OPTIONS "-DMPI_INCLUDE_DIRS:STRING=/opt/cray/mpt/5.5.5/gni/mpich2-gnu/47/include")<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">list(APPEND PARAVIEW_OPTIONS "-DMPI_LIBRARY:FILEPATH=/opt/cray/mpt/5.5.5/gni/mpich2-gnu/47/lib/libmpich.a")<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">list(APPEND PARAVIEW_OPTIONS "-DMPI_EXTRA_LIBRARY:FILEPATH=/opt/cray/mpt/5.5.5/gni/mpich2-gnu/47/lib/libmpichcxx.a")<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
</div>
<div>
<p class="MsoNormal"><br clear="all">
<u></u><u></u></p>
<div>
<p class="MsoNormal">David E DeMarle<br>
Kitware, Inc.<br>
R&D Engineer<br>
21 Corporate Drive<br>
Clifton Park, NY 12065-8662<br>
Phone: <a href="tel:518-881-4909" value="+15188814909" target="_blank">518-881-4909</a><u></u><u></u></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><u></u> <u></u></p>
<div>
<p class="MsoNormal">On Thu, Sep 12, 2013 at 4:57 PM, Hong Yi <<a href="mailto:hongyi@renci.org" target="_blank">hongyi@renci.org</a>> wrote:<u></u><u></u></p>
<div>
<div>
<p class="MsoNormal">I am able to successfully build our Fortran simulation code as well as Catalyst Fortran example code linked to catalyst (built with superbuild), but the resulting executable is not static, but have some dependencies on shared libraries
such as libmpichf90_gnu_47.so.1, limxpmem.so.1, etc., which seems to be resulting from “find_package(MPI)” in CMakeLists.txt that somehow find shared mpi libraries to link to. This dependencies prevents the executables from running on Titan compute nodes.
Since paraview superbuild cross target can generate pvserver as well as other executables statically without any dependencies on other shared libraries, I have been trying to study paraview superbuild trying to build Catalyst in-situ Fortran example code also
statically without any dependencies, but have not been able to succeed. I guess one way to do it is to manually specify all those MPI static libraries in CMake, however, I have not been able to succeed due to so many dependencies of those MPI libraries. Could
anyone advise on how to achieve static linking to MPI libraries automatically by CMake via find_package(MPI)?<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">Thanks,<u></u><u></u></p>
<p class="MsoNormal">Hong <u></u><u></u></p>
</div>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">
http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" target="_blank">
http://paraview.org/Wiki/ParaView</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><u></u><u></u></p>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</div>
<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">
http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" target="_blank">
http://paraview.org/Wiki/ParaView</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><br>
<br>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</div>
</body>
</html>