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