[petsc-dev] problems with shared libraries and pragmatic.py

Matthew Knepley knepley at gmail.com
Thu Oct 15 17:12:38 CDT 2015


On Thu, Oct 15, 2015 at 5:08 PM, Satish Balay <balay at mcs.anl.gov> wrote:

> On Thu, 15 Oct 2015, Sean Farley wrote:
>
> > > BTW: pragmatic is built with cmake, could that be messing it up
> somehow?
> >
> > It might be missing the cmake rpath stuff on osx that uses
> > install_name_tool. If I recall, that isn't set by default.
>
> Ok
> https://bitbucket.org/petsc/pkg-metis/commits/42ab1971218c71b951ba507ca9f16718daae4f6a
>
> So the following patch works.
>

Satish and Sean, you rock.

  Matt


> Satish
>
> ------
>
>
> balay at imav^~/petsc/arch-darwin-c-debug/externalpackages/pragmatic((1344685...))
> $ git diff |cat
> diff --git a/CMakeLists.txt b/CMakeLists.txt
> index ed6af70..d77f3ad 100644
> --- a/CMakeLists.txt
> +++ b/CMakeLists.txt
> @@ -121,6 +121,7 @@ file(GLOB C_SOURCES src/*.c)
>  file(GLOB CXX_SOURCES src/*.cpp)
>
>  # target_link_library
> +set(CMAKE_INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib")
>  add_library(pragmatic SHARED ${C_SOURCES} ${CXX_SOURCES})
>  target_link_libraries(pragmatic ${PRAGMATIC_LIBRARIES})
>
>
> balay at imav^~/petsc(master) $ otool -L
> arch-darwin-c-debug/lib/libpragmatic.dylib
> arch-darwin-c-debug/lib/libpragmatic.dylib:
>         /Users/balay/petsc/arch-darwin-c-debug/lib/libpragmatic.dylib
> (compatibility version 0.0.0, current version 0.0.0)
>         /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current
> version 120.1.0)
>         /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
> version 1225.1.1)
> balay at imav^~/petsc(master) $ make test
> Running test examples to verify correct installation
> Using PETSC_DIR=/Users/balay/petsc and PETSC_ARCH=arch-darwin-c-debug
> C/C++ example src/snes/examples/tutorials/ex19 run successfully with 1 MPI
> process
> Fortran example src/snes/examples/tutorials/ex5f run successfully with 1
> MPI process
> Completed test examples
> =========================================
> Now to evaluate the computer systems you plan use - do:
> make PETSC_DIR=/Users/balay/petsc PETSC_ARCH=arch-darwin-c-debug streams
> NPMAX=<number of MPI processes you intend to use>
> balay at imav^~/petsc(master) $
>



-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20151015/dfbd5231/attachment.html>


More information about the petsc-dev mailing list