<div dir="ltr">I preset these config flags to make sure I got the static MPI libs.<div><br><div><div>list(APPEND PARAVIEW_OPTIONS "-DBUILD_SHARED_LIBS:BOOL=OFF")</div><div>list(APPEND PARAVIEW_OPTIONS "-DPARAVIEW_USE_MPI:BOOL=ON")<br>
</div><div>list(APPEND PARAVIEW_OPTIONS "-DMPI_INCLUDE_DIRS:STRING=/opt/cray/mpt/5.5.5/gni/mpich2-gnu/47/include")<br></div><div>list(APPEND PARAVIEW_OPTIONS "-DMPI_LIBRARY:FILEPATH=/opt/cray/mpt/5.5.5/gni/mpich2-gnu/47/lib/libmpich.a")</div>
<div>list(APPEND PARAVIEW_OPTIONS "-DMPI_EXTRA_LIBRARY:FILEPATH=/opt/cray/mpt/5.5.5/gni/mpich2-gnu/47/lib/libmpichcxx.a")</div><div>list(APPEND PARAVIEW_OPTIONS "-DVTK_USE_SYSTEM_HDF5:BOOL=1")<br></div>
</div></div><div><br></div><div style>It is likely the case that presetting these in your simulation code will make it choose the right ones too:</div><div style><div>list(APPEND PARAVIEW_OPTIONS "-DMPI_INCLUDE_DIRS:STRING=/opt/cray/mpt/5.5.5/gni/mpich2-gnu/47/include")<br>
</div><div>list(APPEND PARAVIEW_OPTIONS "-DMPI_LIBRARY:FILEPATH=/opt/cray/mpt/5.5.5/gni/mpich2-gnu/47/lib/libmpich.a")</div><div>list(APPEND PARAVIEW_OPTIONS "-DMPI_EXTRA_LIBRARY:FILEPATH=/opt/cray/mpt/5.5.5/gni/mpich2-gnu/47/lib/libmpichcxx.a")</div>
<div><br></div></div></div><div class="gmail_extra"><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: 518-881-4909</div>
<br><br><div class="gmail_quote">On Thu, Sep 12, 2013 at 4:57 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" link="blue" vlink="purple">
<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>
<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>