[Paraview] Errors when linking catalyst in ParaView version 4.0.1 to simulation code on Titan
Andy Bauer
andy.bauer at kitware.com
Fri Sep 6 12:32:40 EDT 2013
Hi Hong,
I think it's the Fortran mangling of the names. Try taking out the
underscore on the Fortran subroutine calls. Let me know if that doesn't
help. Otherwise it may be an issue with how C/Fortran mangles things. The
GCC behavior should be the following:
Fortran -> call xyz()
C -> void xyz_() {...}.
All of these methods should be available in the vtkPVCatalyst module. If
you can't get it to work, try to see what you can do with the Fortran
example in the github repo.
Regards,
And
On Thu, Sep 5, 2013 at 5:52 PM, Hong Yi <hongyi at renci.org> wrote:
> When linking our simulation code (a variant of phasta) to Catalyst in
> ParaView version 4.0.1 built on Titan with superbuild, I got the following
> linking errors:
>
> -----------------
> ../../lib/libincompressible.a(itrdrv.f.o): In function `itrdrv_':
> itrdrv.f:(.text+0x2add): undefined reference to `coprocessorinitialize_'
> itrdrv.f:(.text+0x6198): undefined reference to `coprocessorfinalize_'
> itrdrv.f:(.text+0x973d): undefined reference to `coprocessorfinalize_'
> ../../lib/libincompressible.a(phastaadaptor.f.o): In function
> `phastacoprocessor_':
> phastaadaptor.f:(.text+0x84): undefined reference to
> `requestdatadescription_'
> phastaadaptor.f:(.text+0x95): undefined reference to `needtocreategrid_'
> phastaadaptor.f:(.text+0xba): undefined reference to `coprocess_'
> /usr/bin/ld: link errors found, deleting executable
> `../../bin/phastaIC.exe'
> -----------------
>
> I use CMake to link Catalyst to our simulation code. I was able to resolve
> those linking errors when linking to ParaView version 3.98.1 by adding
> "find_package(ParaView 3.98 REQUIRED COMPONENTS FortranAdaptor)" in
> addition to find_package for vtkCoProcessorImplementation and then link
> both to the final executable. However, for ParaView version 4.0.1, it seems
> FortranAdaptor does not exist any more which defines those functions such
> as coprocessorinitialize, etc. Here is the corresponding excerpt in my
> CMakeLists.txt related to linking Catalyst in ParaView version 4.0.1:
> -------------------
> if(USE_CATALYST)
> find_package(ParaView 3.98 REQUIRED COMPONENTS vtkPVPythonCatalyst)
> find_library(PHASTA_ADAPTOR_LIB PhastaAdaptorLib)
> include("${PARAVIEW_USE_FILE}")
> set(Adaptor_SRCS phastaadaptor.f)
> add_library(Adaptor ${Adaptor_SRCS})
> target_link_libraries(Adaptor ${PHASTA_ADAPTOR_LIB}
> vtkPVPythonCatalyst)
> add_definitions("-DUSE_CATALYST")
> endif()
> -------------------
>
> Adaptor is then linked to the final executable.
>
> Please let me know if you have ideas on what I should do to resolve those
> linking errors.
>
> Many 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/20130906/5c309b1f/attachment.htm>
More information about the ParaView
mailing list