[Dune] build dune-grid 2.3.0
Markus Blatt
markus at dr-blatt.de
Wed Feb 18 12:42:59 CET 2015
Hi Marco,
On Wed, Feb 18, 2015 at 11:09:13AM +0100, Marco Cisternino wrote:
> Good morning,
> I have a small question about library link path in libtool building libalu.la
> I use a user version of openmpi(${HOME}/lib/openmpi) and I specify
> in my environmental variable (LD_LIBRARY_PATH, LIBRARY_PATH,
> PATH,CPLUS_INCLUDE_PATH) the path to this openmpi version.
This should not bee needed as DUNE should figure this out from MPICC
> I specify in the file I pass with --opts flag that CXX=mpiCC and
> mpiCC is in the user openmpi location
Please use the regular compiler here. But be sure that it is the same
that you compiled mpi with, e.g.
CXX=g++
CC=gcc
MPICC=/full/path/to/mpicc
> I have also tried to pass LDFLAGS explicitly into this file.
> No matter what, the make building enters dune/grid/alugrid and libtool tries to link the static libraries needed to libalu searching mpi libraries in /usr/lib!!!! Why?
> Could anyone explain me how to force libtool to search in a specific path efficiently, please?
> I know the ALUGrid became a dune module but I can't do the update at the moment.
>
To compile alugrid with the correct flags, I usually use some DUNE
magic, i.e. I use dune-common/bin/mpi-config to get the same flags as
used in DUNE:
CXX=g++
CC=gcc
MPICC=/full/path/to/mpicc
./configure CC=$CC CXX=$CXX F77=$F77 --enable-static --disable-shared \
--prefix=/home/mblatt/src/dune/3rdParty/grids/alugrid52-install \
CXXFLAGS="$CXXFLAGS" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS \
`/path/to/dune-common/bin/mpi-config --cflags --disable-cxx \
--mpicc=$MPICC`" LDFLAGS="$LDFLAGS \
`/path/to//dune-common/bin/mpi-config --libs --disable-cxx \
--mpicc=$MPICC`" && make $MAKE_FLAGS clean install
BTW the --enabled-static --disable-shared is probably not needed and
not even wanted.
> The need to use a user version of openmpi comes from the fact that ubuntu's openmpi comes without static libraries.
What is wrong with static libraries?
> In order to overcome this problem I made a symbolic link in /usr/lib/openmpi/lib to the static mpi libraries in my home
> The weird thing is that looking in libalu.la, dependency_libs contains both /usr/lib/openmpi/lib links and openmpi in my home!
>
Markus
--
Do you need more support with DUNE or HPC in general?
Dr. Markus Blatt - HPC-Simulation-Software & Services http://www.dr-blatt.de
Hans-Bunte-Str. 8-10, 69123 Heidelberg, Germany
Tel.: +49 (0) 160 97590858
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <https://lists.dune-project.org/pipermail/dune/attachments/20150218/144797ad/attachment.sig>
More information about the Dune
mailing list