[Trilinos-Users] [EXTERNAL] Re: linking in MPI tracing TPL

Bradley, Andrew Michael ambradl at sandia.gov
Thu Dec 10 12:05:36 EST 2015


Hi Tom,

I'm probably wrong about this, but it occurs to me that the issue might be in the miniPIC configuration. Is miniPIC built separately from Trilinos, or as an extra repo inside Trilinos? If it's a separate configuration, then one has to transfer the information from ${TRILINOS_INSTALL_DIR}/lib/cmake/Trilinos/TrilinosConfig.cmake to the miniPIC configuration.

In the miniPIC CMakeLists.txt, you'd write something like
    find_package (Trilinos REQUIRED) # probably already in miniPIC's CMakeLists.txt
and then use this variable
    Trilinos_EXTRA_LD_FLAGS
in the target_link_libraries line.

One easy thing to check is the text of the link.txt file associated with miniPIC. The file is something like:
    ${MINIPIC_BUILD_DIR}/src/CMakeFiles/miniPIC.dir/link.txt
That shows the link line directly. If your library doesn't show up on that link line, then there's still a problem. Once it shows up, you should be good (unless there are some preprocessor defines associated with enabling functionality, in which case those would have to be specified as well).

Andrew

________________________________________
From: Trilinos-Users <trilinos-users-bounces at trilinos.org> on behalf of Bartlett, Roscoe A. <bartlettra at ornl.gov>
Sent: Thursday, December 10, 2015 9:53 AM
To: Spelce, Thomas; trilinos-users at trilinos.org
Subject: [EXTERNAL] Re: [Trilinos-Users] linking in MPI tracing TPL

You might try unwrapping the MPI compiler wrappers using, for example, 'mpicc show' and then use raw compilers.  See "Configuring to build using raw compilers and flags/libraries" under section "5.9   Configuring with MPI support" at:

   https://trilinos.org/docs/files/TrilinosBuildReference.html#configuring-with-mpi-support

That way, you can specify exactly the libraries in that you want in the order that you want.

I have not tried this in many years but it might work.

-Ross


> -----Original Message-----
> From: Trilinos-Users [mailto:trilinos-users-bounces at trilinos.org] On Behalf
> Of Spelce, Thomas
> Sent: Thursday, December 10, 2015 11:45 AM
> To: trilinos-users at trilinos.org
> Subject: [Trilinos-Users] linking in MPI tracing TPL
>
> I'm trying to link in a simple MPI tracing library to an app (miniPIC)  built on
> top of trilinos. I've tried a couple variations of specifying the library such as
> adding
>
> "-D Trilinos_EXTRA_LINK_FLAGS:STRING="path_to_library/library.a" \ " as
> the last line of my trilinos "do-donfigure" script. The subsequent
> configuration and build process proceeds without error, but after building
> miniPIC I'm not getting the trace data I'm expecting. I know there's a more
> complicated path using TPL's, etc, but I'd like to avoid that if possible.
>
>
> What's the preferred way to link in the single library to enable my desired
> effect?
>
>
> Tom Spelce
>
>
> _______________________________________________
> Trilinos-Users mailing list
> Trilinos-Users at trilinos.org
> https://trilinos.org/mailman/listinfo/trilinos-users

_______________________________________________
Trilinos-Users mailing list
Trilinos-Users at trilinos.org
https://trilinos.org/mailman/listinfo/trilinos-users


More information about the Trilinos-Users mailing list