← Back to team overview

dolfin team mailing list archive

Re: [HG] Add flag --disable-petsc.

 

I agree it's a lot of ifdefs, but I thought it was good to see where
we depend on PETSc and try to remove the dependencies by making things
work with GenericMatrix. That way, one can use PETSc or something
else. I thought about generating run-time errors but maybe that's just
hiding the problems?

But I don't have a very strong opinion about not generating run-time
errors so I could be convinced otherwise.

In a few places, I found alternative solutions (like using
DenseMatrix) or matrix free algorithms. When this happens (mostly in
the ODE solvers), there will be a runtime message that DOLFIN has been
compiled without PETSc and so an alternative strategy was chosen.

/Anders

On Sun, May 07, 2006 at 08:08:15PM +0200, Garth N. Wells wrote:
> Rather than having ifdef's for PETSc throughout the code, would it be
> better to localise them to files in src/kernel/la by putting ifdef's
> around calls to PETSc functions and return a run-time error if a
> function that makes a PETSc call is called. That way they are limited to
> a few files only.
> 
> Garth
> 
> On Sun, 2006-05-07 at 16:30 +0200, Anders Logg wrote: 
> > Should be fixed now.
> > 
> > The guys here at Simula use the DOLFIN mesh (and only the mesh) so
> > being able to compile DOLFIN without dragging along the whole PETSc
> > is a big win.
> > 
> > /Anders
> > 
> > On Sun, May 07, 2006 at 04:00:03PM +0200, Anders Logg wrote:
> > > Yes, but only with --disable-petsc. I'll fix it. I removed the dummy
> > > arguments Matrix* A = 0 to avoid the PETSc dependence.
> > > 
> > > /Anders
> > > 
> > > On Sun, May 07, 2006 at 05:40:23PM +0200, Garth N. Wells wrote:
> > > > I get a compile error in FEM.h when trying to pass "0" as a NULL
> > > > pointer. Anders, did you try compiling it all?
> > > > 
> > > > Garth 
> > > > 
> > > > 
> > > > 
> > > > On Sun, 2006-05-07 at 13:27 +0200, DOLFIN wrote:
> > > > > One or more new changesets pushed to the primary DOLFIN repository.
> > > > > A short summary of the last three changesets is included below.
> > > > > 
> > > > > changeset:   1918:a6cd809950c21548d6d9666a64e21d3ddc3decdc
> > > > > tag:         tip
> > > > > user:        "Anders Logg <logg@xxxxxxxxx>"
> > > > > date:        Sun May  7 13:26:31 2006 +0200
> > > > > files:       configure configure.ac src/kernel/fem/FEM.cpp src/kernel/fem/LoadVector.cpp src/kernel/fem/MassMatrix.cpp src/kernel/fem/StiffnessMatrix.cpp src/kernel/fem/dolfin/FEM.h src/kernel/fem/dolfin/LoadVector.h src/kernel/fem/dolfin/MassMatrix.h src/kernel/fem/dolfin/StiffnessMatrix.h src/kernel/function/ConstantFunction.cpp src/kernel/function/DiscreteFunction.cpp src/kernel/function/Function.cpp src/kernel/function/FunctionPointerFunction.cpp src/kernel/function/UserFunction.cpp src/kernel/function/dolfin/ConstantFunction.h src/kernel/function/dolfin/DiscreteFunction.h src/kernel/function/dolfin/Function.h src/kernel/function/dolfin/FunctionPointerFunction.h src/kernel/function/dolfin/GenericFunction.h src/kernel/function/dolfin/UserFunction.h src/kernel/io/File.cpp src/kernel/io/MFile.cpp src/kernel/io/MTXFile.cpp src/kernel/io/MatlabFile.cpp src/kernel/io/OctaveFile.cpp src/kernel/io/VTKFile.cpp src/kernel/io/XMLFile.cpp src/kernel/io/XMLMatrix.cpp src/kerne
>  l/io/X
> > > >  ML
> > > > >  Vector.cpp src/kernel/io/dolfin/MFile.h src/kernel/io/dolfin/MTXFile.h src/kernel/io/dolfin/MatlabFile.h src/kernel/io/dolfin/OctaveFile.h src/kernel/io/dolfin/VTKFile.h src/kernel/io/dolfin/XMLFile.h src/kernel/io/dolfin/XMLMatrix.h src/kernel/io/dolfin/XMLVector.h src/kernel/la/EigenvalueSolver.cpp src/kernel/la/GMRES.cpp src/kernel/la/KrylovSolver.cpp src/kernel/la/LU.cpp src/kernel/la/LinearSolver.cpp src/kernel/la/Matrix.cpp src/kernel/la/PETScManager.cpp src/kernel/la/Preconditioner.cpp src/kernel/la/Vector.cpp src/kernel/la/VirtualMatrix.cpp src/kernel/la/dolfin/DenseMatrix.h src/kernel/la/dolfin/EigenvalueSolver.h src/kernel/la/dolfin/GMRES.h src/kernel/la/dolfin/KrylovSolver.h src/kernel/la/dolfin/LU.h src/kernel/la/dolfin/LinearSolver.h src/kernel/la/dolfin/Matrix.h src/kernel/la/dolfin/PETScManager.h src/kernel/la/dolfin/Preconditioner.h src/kernel/la/dolfin/Vector.h src/kernel/la/dolfin/VirtualMatrix.h src/kernel/main/init.cpp src/kernel/nls/NewtonSolver.
>  cpp sr
> > > >  c/
> > > > >  kernel/nls/dolfin/NewtonSolver.h src/kernel/ode/Dependencies.cpp src/kernel/ode/Homotopy.cpp src/kernel/ode/HomotopyJacobian.cpp src/kernel/ode/HomotopyODE.cpp src/kernel/ode/MonoAdaptiveFixedPointSolver.cpp src/kernel/ode/MonoAdaptiveJacobian.cpp src/kernel/ode/MonoAdaptiveNewtonSolver.cpp src/kernel/ode/MonoAdaptiveTimeSlab.cpp src/kernel/ode/MultiAdaptiveJacobian.cpp src/kernel/ode/MultiAdaptiveNewtonSolver.cpp src/kernel/ode/MultiAdaptivePreconditioner.cpp src/kernel/ode/MultiAdaptiveTimeSlab.cpp src/kernel/ode/ODE.cpp src/kernel/ode/TimeSlabJacobian.cpp src/kernel/ode/TimeStepper.cpp src/kernel/ode/UpdatedMultiAdaptiveJacobian.cpp src/kernel/ode/cGqMethod.cpp src/kernel/ode/dGqMethod.cpp src/kernel/ode/dolfin/Dependencies.h src/kernel/ode/dolfin/Homotopy.h src/kernel/ode/dolfin/HomotopyJacobian.h src/kernel/ode/dolfin/HomotopyODE.h src/kernel/ode/dolfin/MonoAdaptiveFixedPointSolver.h src/kernel/ode/dolfin/MonoAdaptiveJacobian.h src/kernel/ode/dolfin/MonoAdaptive
>  Newton
> > > >  So
> > > > >  lver.h src/kernel/ode/dolfin/MonoAdaptiveTimeSlab.h src/kernel/ode/dolfin/MultiAdaptiveJacobian.h src/kernel/ode/dolfin/MultiAdaptiveNewtonSolver.h src/kernel/ode/dolfin/MultiAdaptivePreconditioner.h src/kernel/ode/dolfin/ODE.h src/kernel/ode/dolfin/TimeSlabJacobian.h src/kernel/ode/dolfin/UpdatedMultiAdaptiveJacobian.h src/kernel/pde/LinearPDE.cpp src/kernel/pde/NonlinearPDE.cpp src/kernel/pde/PDE.cpp src/kernel/pde/dolfin/LinearPDE.h src/kernel/pde/dolfin/NonlinearPDE.h src/kernel/pde/dolfin/PDE.h src/kernel/quadrature/GaussianQuadrature.cpp src/modules/convdiff/ConvectionDiffusionSolver.cpp src/modules/convdiff/dolfin/ConvectionDiffusionSolver.h src/modules/elasticity-updated/ElasticityUpdatedSolver.cpp src/modules/elasticity-updated/dolfin/ElasticityUpdatedSolver.h src/modules/elasticity/ElasticitySolver.cpp src/modules/elasticity/dolfin/ElasticitySolver.h src/modules/heat/HeatSolver.cpp src/modules/heat/dolfin/HeatSolver.h src/modules/navierstokes/NSESolver.cpp 
>  src/mo
> > > >  du
> > > > >  les/navierstokes/dolfin/NSESolver.h src/modules/poisson/PoissonSolver.cpp src/modules/poisson/dolfin/PoissonSolver.h src/modules/stokes/StokesSolver.cpp src/modules/stokes/dolfin/StokesSolver.h
> > > > > description:
> > > > > Add flag --disable-petsc.
> > > > > 
> > > > > This flag disables the check for PETSc and makes it possible to
> > > > > compile certain parts of DOLFIN (in particular the mesh) without
> > > > > needing to install PETSc.
> > > > > 
> > > > > 
> > > > > changeset:   1917:d6623509b168fdfab26b6c2ffd7822765071d755
> > > > > user:        "Anders Logg <logg@xxxxxxxxx>"
> > > > > date:        Sat May  6 11:28:19 2006 +0200
> > > > > files:       configure configure.ac
> > > > > description:
> > > > > Remove configure option --disable-mpi and replace with --enable-mpi.
> > > > > If MPI is used, the best option seems to be to let PETSc download it anyway
> > > > > and then it's not necessary for DOLFIN to look for it. Note that PETSc
> > > > > hangs during initialization with mpich 1.0 from Ubuntu.
> > > > > 
> > > > > 
> > > > > changeset:   1916:83a5761541fe6bacc8e2d797d5972e3b1b2fae52
> > > > > user:        "Anders Logg <logg@xxxxxxxxx>"
> > > > > date:        Fri May  5 19:00:45 2006 +0200
> > > > > files:       Makefile.in aclocal.m4 configure configure.ac src/Makefile.in src/bench/Makefile.in src/bench/ode/Makefile.in src/config/Makefile.in src/demo/Makefile.in src/demo/fem/Makefile.in src/demo/nls/Makefile.in src/demo/ode/Makefile.in src/demo/ode/homotopy/Makefile.in src/demo/pde/Makefile.in src/demo/pde/nonlinear/Makefile.in src/demo/pde/stokes/Makefile.in src/demo/scripting/Makefile.in src/demo/solvers/Makefile.in src/demo/solvers/navierstokes/Makefile.in src/greeting/Makefile.in src/kernel/Makefile.in src/kernel/common/Makefile.in src/kernel/common/dolfin/Makefile.in src/kernel/fem/Makefile.in src/kernel/fem/dolfin/Makefile.in src/kernel/form/Makefile.in src/kernel/form/dolfin/Makefile.in src/kernel/function/Makefile.in src/kernel/function/dolfin/Makefile.in src/kernel/io/Makefile.in src/kernel/io/dolfin/Makefile.in src/kernel/la/Makefile.in src/kernel/la/dolfin/Makefile.in src/kernel/log/Makefile.in src/kernel/log/dolfin/Makefile.in src/kernel/main/Makefil
>  e.in s
> > > >  rc
> > > > >  /kernel/main/dolfin/Makefile.in src/kernel/math/Makefile.in src/kernel/math/dolfin/Makefile.in src/kernel/mesh/Makefile.in src/kernel/mesh/dolfin/Makefile.in src/kernel/nls/Makefile.in src/kernel/nls/dolfin/Makefile.in src/kernel/ode/Makefile.in src/kernel/ode/dolfin/Makefile.in src/kernel/parameter/Makefile.in src/kernel/parameter/dolfin/Makefile.in src/kernel/pde/Makefile.in src/kernel/pde/dolfin/Makefile.in src/kernel/quadrature/Makefile.in src/kernel/quadrature/dolfin/Makefile.in src/lib/Makefile.in src/modules/Makefile.in src/modules/convdiff/Makefile.in src/modules/convdiff/dolfin/Makefile.in src/modules/dolfin/Makefile.in src/modules/elasticity-updated/Makefile.in src/modules/elasticity-updated/dolfin/Makefile.in src/modules/elasticity/Makefile.in src/modules/elasticity/dolfin/Makefile.in src/modules/heat/Makefile.in src/modules/heat/dolfin/Makefile.in src/modules/navierstokes/Makefile.in src/modules/navierstokes/dolfin/Makefile.in src/modules/poisson/Makefile
>  .in sr
> > > >  c/
> > > > >  modules/poisson/dolfin/Makefile.in src/modules/stokes/Makefile.in src/modules/stokes/dolfin/Makefile.in src/post/Makefile.in src/pre/Makefile.in src/pydolfin/Makefile.in src/utils/Makefile.in src/utils/convert/Makefile.in src/utils/inp2dx/Makefile.in
> > > > > description:
> > > > > Add help text for Boost (libboost-dev) to configure
> > > > > 
> > > > > 
> > > > > -------------------------------------------------------
> > > > > For more details, visit http://www.fenics.org/hg/dolfin
> > > > > 
> > > > > _______________________________________________
> > > > > DOLFIN-dev mailing list
> > > > > DOLFIN-dev@xxxxxxxxxx
> > > > > http://www.fenics.org/cgi-bin/mailman/listinfo/dolfin-dev
> > > 
> > > _______________________________________________
> > > DOLFIN-dev mailing list
> > > DOLFIN-dev@xxxxxxxxxx
> > > http://www.fenics.org/cgi-bin/mailman/listinfo/dolfin-dev
> > 
> > _______________________________________________
> > DOLFIN-dev mailing list
> > DOLFIN-dev@xxxxxxxxxx
> > http://www.fenics.org/cgi-bin/mailman/listinfo/dolfin-dev
> 
> 
> _______________________________________________
> DOLFIN-dev mailing list
> DOLFIN-dev@xxxxxxxxxx
> http://www.fenics.org/cgi-bin/mailman/listinfo/dolfin-dev



References