[Paraview] Statically linking catalyst to fortran simulation code on Titan

David E DeMarle dave.demarle at kitware.com
Thu Sep 12 17:33:39 EDT 2013


They are overridden in the CMakeCache then? Ie you preset them and
something later changes them.

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.

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.

good luck!


David E DeMarle
Kitware, Inc.
R&D Engineer
21 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-881-4909


On Thu, Sep 12, 2013 at 5:26 PM, Hong Yi <hongyi at renci.org> wrote:

>  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.****
>
> ** **
>
> Regards,****
>
> Hong****
>
> ** **
>
> *From:* David E DeMarle [mailto:dave.demarle at kitware.com]
> *Sent:* Thursday, September 12, 2013 5:03 PM
> *To:* Hong Yi
> *Cc:* paraview at paraview.org
> *Subject:* Re: [Paraview] Statically linking catalyst to fortran
> simulation code on Titan****
>
> ** **
>
> I preset these config flags to make sure I got the static MPI libs.****
>
> ** **
>
> list(APPEND PARAVIEW_OPTIONS "-DBUILD_SHARED_LIBS:BOOL=OFF")****
>
> list(APPEND PARAVIEW_OPTIONS "-DPARAVIEW_USE_MPI:BOOL=ON")****
>
> list(APPEND PARAVIEW_OPTIONS
> "-DMPI_INCLUDE_DIRS:STRING=/opt/cray/mpt/5.5.5/gni/mpich2-gnu/47/include")
> ****
>
> list(APPEND PARAVIEW_OPTIONS
> "-DMPI_LIBRARY:FILEPATH=/opt/cray/mpt/5.5.5/gni/mpich2-gnu/47/lib/libmpich.a")
> ****
>
> list(APPEND PARAVIEW_OPTIONS
> "-DMPI_EXTRA_LIBRARY:FILEPATH=/opt/cray/mpt/5.5.5/gni/mpich2-gnu/47/lib/libmpichcxx.a")
> ****
>
> list(APPEND PARAVIEW_OPTIONS "-DVTK_USE_SYSTEM_HDF5:BOOL=1")****
>
> ** **
>
> It is likely the case that presetting these in your simulation code will
> make it choose the right ones too:****
>
> list(APPEND PARAVIEW_OPTIONS
> "-DMPI_INCLUDE_DIRS:STRING=/opt/cray/mpt/5.5.5/gni/mpich2-gnu/47/include")
> ****
>
> list(APPEND PARAVIEW_OPTIONS
> "-DMPI_LIBRARY:FILEPATH=/opt/cray/mpt/5.5.5/gni/mpich2-gnu/47/lib/libmpich.a")
> ****
>
> list(APPEND PARAVIEW_OPTIONS
> "-DMPI_EXTRA_LIBRARY:FILEPATH=/opt/cray/mpt/5.5.5/gni/mpich2-gnu/47/lib/libmpichcxx.a")
> ****
>
> ** **
>
>
> ****
>
> David E DeMarle
> Kitware, Inc.
> R&D Engineer
> 21 Corporate Drive
> Clifton Park, NY 12065-8662
> Phone: 518-881-4909****
>
> ** **
>
> On Thu, Sep 12, 2013 at 4:57 PM, Hong Yi <hongyi at renci.org> wrote:****
>
> 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)?****
>
>  ****
>
> Thanks,****
>
> Hong ****
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the ParaView Wiki at:
> http://paraview.org/Wiki/ParaView
>
> Follow this link to subscribe/unsubscribe:
> http://www.paraview.org/mailman/listinfo/paraview****
>
> ** **
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20130912/bdfdb828/attachment.htm>


More information about the ParaView mailing list