dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #07427
Re: Several fixes for gcc-4.3.0
On Sun, Apr 13, 2008 at 08:28:34PM +0100, Garth N. Wells wrote:
> Matthew Knepley wrote:
> > I have said this more than 13 times.
>
> Nice that you're counting ;).
>
> That link procedure is Wrong Wrong Wrong.
> > I have also given the right ways to do it:
> >
> > 1) 'make getlinklibs' prints the correct link line
> >
> > 2) 'include ${PETSC_DIR}/conf/variables' in the makefile and use
> > ${PETSC_TS_LIB}
It's been there:
http://fenics.org/hg/dolfin?cs=716a643cf63b
but was later removed:
http://fenics.org/hg/dolfin?cs=5f87c119a79d
> > 3) Load the pickled configure information and read it into Python.
> > There is an example
> > in $PETSC_DIR/bin/configVars.py
> >
> > Why in the hell is this still screwed up? Of course you need to link
> > all the 3rd party
> > libraries.
> >
>
> There is a reason why we don't want to link to third-party libraries
> which PETSc depends on. The reason has been discussed at length on this
> list; we don't want to be tied into the libraries (and versions of
> libraries) which PETSc downloads and uses, and possibly modifies. Any
> suggestions on how deal nicely with this issue are welcome.
Don't we always need to ask a library which has other dependencies
which those dependencies are and add them when building an application
against DOLFIN (and PETSc)?
In dolfin.pc, we have
Requires: numpy-1 boost ufc-1 umfpack python-2 petsc gts scotch libxml-2.0
which means pkg-config will lookup petsc.pc to find the dependencies
for PETSc. Then petsc.pc should list its requirements etc, or list
them in the Libs field. (Since PETSc mostly downloads/builds its own
stuff, it's more appropriate to just list the dependencies in the Libs
field.)
It seems to me we need to add everything PETSc needs in the Libs field
in petsc.pc (by looking at PETSC_TS_LIB). If we stick it in at the
end, it shouldn't mess anything else up, since other dependencies will
be found first.
--
Anders
> Garth
>
> > Matt
> >
> > On Sun, Apr 13, 2008 at 12:35 PM, Jed Brown <jed@xxxxxxxx> wrote:
> >> On Sun 2008-04-13 18:21, Garth N. Wells wrote:
> >> >
> >> >
> >> > Jed Brown wrote:
> >> > > I had to make a number of minor changes in order to build with gcc 4.3.0 which
> >> > > is much stricter. Also, the swig wrapper will not build with -Werror.
> >> > >
> >> > > It seems like the current build system is rather broken with respect to PETSc
> >> > > since I cannot build with extra preconditioning libraries. A huge advantage of
> >> > > PETSc is that I can try out a bunch of preconditioners easily. As far as I can
> >> > > tell, the current build just adds linker options $PETSC_DIR/lib/$PETSC_ARCH and
> >> > > -lpetscxxx which is not sufficient if I built with Hypre, ML, etc. While it's
> >> > > not painful to keep a special PETSC_ARCH with a minimal build just for dolfin,
> >> > > it would be nice to use a more full-featured PETSc.
> >> >
> >> > It should be possible to use all the features of PETSc, and -lpetscksp
> >> > should provide access to all the preconditioners. If you provide more
> >> > details of the problem that you're facing we can look at it.
> >> >
> >> > What we don't want is to link directly to packages which PETSc depends
> >> > on. PETSc takes care of this.
> >>
> >> My build fails if I use a slightly more featured PETSc configuration. This PETSc was configured with
> >>
> >> --with-mpi-dir=/usr --with-blas-lapack-dir=/usr --download-umfpack=ifneeded --download-hypre=ifneeded
> >>
> >> so I need some linker flags that are not present below.
> >>
> >> Jed
> >>
> >>
> >> mpic++ -o demo/function/cpp/demo -Wl,-rpath,/home/jed/usr/petsc-2.3.3-p12/lib/ompi demo/function/cpp/main.o -Ldolfin -L/home/jed/usr/petsc-2.3.3-p12/lib/ompi -ldolfin -lxml2 -lpetscts -lpetscsnes -lpetscksp -lpetscdm -lpetscmat -lpetscvec -lpetsc
> >> dolfin/libdolfin.so: undefined reference to `HYPRE_IJVectorGetObject'
> >> dolfin/libdolfin.so: undefined reference to `HYPRE_BoomerAMGSetCycleType'
> >> dolfin/libdolfin.so: undefined reference to `dpttrf_'
> >> dolfin/libdolfin.so: undefined reference to `umfpack_di_report_numeric'
> >> dolfin/libdolfin.so: undefined reference to `dswap_'
> >> dolfin/libdolfin.so: undefined reference to `XCreatePixmap'
> >> dolfin/libdolfin.so: undefined reference to `dpotrf_'
> >> dolfin/libdolfin.so: undefined reference to `dgemm_'
> >> dolfin/libdolfin.so: undefined reference to `HYPRE_BoomerAMGSetRelaxType'
> >> dolfin/libdolfin.so: undefined reference to `HYPRE_BoomerAMGSetSmoothNumLevels'
> >> dolfin/libdolfin.so: undefined reference to `HYPRE_IJMatrixCreate'
> >> dolfin/libdolfin.so: undefined reference to `XSetForeground'
> >> dolfin/libdolfin.so: undefined reference to `XUndefineCursor'
> >> dolfin/libdolfin.so: undefined reference to `HYPRE_IJVectorInitialize'
> >> dolfin/libdolfin.so: undefined reference to `HYPRE_ParaSailsSetParams'
> >> dolfin/libdolfin.so: undefined reference to `HYPRE_IJMatrixSetRowSizes'
> >> dolfin/libdolfin.so: undefined reference to `dnrm2_'
> >> dolfin/libdolfin.so: undefined reference to `dscal_'
> >> dolfin/libdolfin.so: undefined reference to `HYPRE_BoomerAMGSetCoarsenType'
> >>
> >> ...
> >>
> >>
> >> _______________________________________________
> >> DOLFIN-dev mailing list
> >> DOLFIN-dev@xxxxxxxxxx
> >> http://www.fenics.org/mailman/listinfo/dolfin-dev
> >>
> >
> >
> >
>
> _______________________________________________
> DOLFIN-dev mailing list
> DOLFIN-dev@xxxxxxxxxx
> http://www.fenics.org/mailman/listinfo/dolfin-dev
Follow ups
References