set default solver_type for project()

Issue #1054 new
Evan Cummings created an issue

Hi all,

Due to the fact that the default solver_type for project() is lu, I frequently get an error such as:

#!
UMFPACK V5.7.1 (Oct 10, 2014): ERROR: out of memory

Traceback (most recent call last):
  File "ISMIP_HOM_A.py", line 146, in <module>
    linear=linear)
  File "/home/pf4d/software/cslvr/cslvr/momentumstokes.py", line 176, in __init__
    t_21_bc    = DirichletBC(model.Q, t_0_x, model.ff, model.GAMMA_B_GND)
  File "/home/pf4d/local/dolfin-2017.2.0.post0/lib/python2.7/site-packages/dolfin/fem/bcs.py", line 95, in __init__
    expr = project(args[1], args[0])
  File "/home/pf4d/local/dolfin-2017.2.0.post0/lib/python2.7/site-packages/dolfin/fem/projection.py", line 147, in project
    cpp.la_solve(A, function.vector(), b, solver_type, preconditioner_type)
  File "/home/pf4d/local/dolfin-2017.2.0.post0/lib/python2.7/site-packages/dolfin/cpp/la.py", line 4850, in la_solve
    return _la.la_solve(*args)
RuntimeError: 

*** -------------------------------------------------------------------------
*** DOLFIN encountered an error. If you are not able to resolve this issue
*** using the information listed below, you can ask for help at
***
***     fenics-support@googlegroups.com
***
*** Remember to include the error message listed below and, if possible,
*** include a *minimal* running example to reproduce the error.
***
*** -------------------------------------------------------------------------
*** Error:   Unable to successfully call PETSc function 'KSPSolve'.
*** Reason:  PETSc error code is: 76 (Error in external library).
*** Where:   This error was encountered inside /home/pf4d/software/dolfin/dolfin/la/PETScKrylovSolver.cpp.
*** Process: 0
*** 
*** DOLFIN version: 2017.2.0
*** Git changeset:  4c59bbdb45b95db2f07f4e3fd8985c098615527f
*** -------------------------------------------------------------------------

To avoid this, I go through all my code and set solver_type='iterative' to each call to project(). However, this only partly fixes my problem as project() is used internally by dolfin; for example, the error above resulted from creating a DirichletBC object.

It would be nice to set the default projection method within the parameters, that's all.

Comments (1)

  1. Log in to comment