project/interpolate crashes in parallell for overlapping meshes of different size
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
DOLFIN |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
It seems like it's not possible to interpolate from one functionspace into another where the only difference between the two is the number of elements on each mesh. I suppose this is the same error as when trying to use eval(x) in parallel and the point x can only be on one processor and thus the other processes throws an error. I'm sure you're already aware of this, but I couldn't find a similar bug report and this is quite important for using gradually refined meshes in a turbulence benchmark I'm working on.
The following code works with a single processor, but fails in parallel
from dolfin import *
#parameters[
mesh = UnitSquare(4 4)
V = FunctionSpace(mesh, 'CG', 1)
u = interpolate(
mesh2 = UnitSquare(6, 6)
V2 = FunctionSpace(
u2 = project(u, V2)
Error message:
mpirun -np 2 python test_interpolate.py
Process 0: Number of global vertices: 25
Process 0: Number of global cells: 32
Process 0: Partitioned mesh, edge cut is 4.
Process 1: Partitioned mesh, edge cut is 4.
Process 0: Number of global vertices: 49
Process 0: Number of global cells: 72
Process 1: Partitioned mesh, edge cut is 6.
Process 0: Partitioned mesh, edge cut is 6.
Traceback (most recent call last):
File "test_interpola
u2 = project(u, V2)
File "/home/
form_
File "/home/
Traceback (most recent call last):
File "test_interpola
u2 = project(u, V2)
File "/home/
form_
File "/home/
finalize_
finalize_
File "/home/
File "/home/
return _fem.assemble_
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
***
*** https:/
***
*** Remember to include the error message listed below and, if possible,
*** include a *minimal* running example to reproduce the error.
***
*** -------
*** Error: Unable to evaluate function at point.
*** Reason: The point is not inside the domain. Consider setting "allow_
*** Where: This error was encountered inside Function.cpp.
*** Process: 1
*** -------
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/
from apport.fileutils import likely_packaged, get_recent_crashes
File "/usr/lib/
from apport.report import Report
File "/usr/lib/
import problem_report
File "/usr/lib/
import zlib, base64, time, sys, gzip, struct, os
File "/usr/lib/
import io
File "/usr/lib/
from _io import (DEFAULT_
ImportError: cannot import name DEFAULT_BUFFER_SIZE
Original exception was:
Traceback (most recent call last):
File "test_interpola
u2 = project(u, V2)
File "/home/
form_
File "/home/
finalize_
File "/home/
return _fem.assemble_
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
***
*** https:/
***
*** Remember to include the error message listed below and, if possible,
*** include a *minimal* running example to reproduce the error.
***
*** -------
*** Error: Unable to evaluate function at point.
*** Reason: The point is not inside the domain. Consider setting "allow_
*** Where: This error was encountered inside Function.cpp.
*** Process: 1
*** -------
return _fem.assemble_
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
***
*** https:/
***
*** Remember to include the error message listed below and, if possible,
*** include a *minimal* running example to reproduce the error.
***
*** -------
*** Error: Unable to evaluate function at point.
*** Reason: The point is not inside the domain. Consider setting "allow_
*** Where: This error was encountered inside Function.cpp.
*** Process: 0
*** -------
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/
from apport.fileutils import likely_packaged, get_recent_crashes
File "/usr/lib/
from apport.report import Report
File "/usr/lib/
import problem_report
File "/usr/lib/
import zlib, base64, time, sys, gzip, struct, os
File "/usr/lib/
import io
File "/usr/lib/
from _io import (DEFAULT_
ImportError: cannot import name DEFAULT_BUFFER_SIZE
Original exception was:
Traceback (most recent call last):
File "test_interpola
u2 = project(u, V2)
File "/home/
form_
File "/home/
finalize_
File "/home/
return _fem.assemble_
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
***
*** https:/
***
*** Remember to include the error message listed below and, if possible,
*** include a *minimal* running example to reproduce the error.
***
*** -------
*** Error: Unable to evaluate function at point.
*** Reason: The point is not inside the domain. Consider setting "allow_
*** Where: This error was encountered inside Function.cpp.
*** Process: 0
*** -------
Changed in dolfin: | |
status: | New → Confirmed |
I think the behaviour of parameters[ 'allow_ extrapolation' ]=True maybe requires a revision. My opinion is that it should allow only extrapolation out of a global mesh not outside a partition.
Current behaviour reflects practical point of view - when process does not know some value it extrapolates. But from mathematical point of view it should be guaranteed that user's program behaves consistently if run by 1 or more processes (at least in the case of a single-instruction code like in the bug description). Also like Mikael noted it computes rubbish when extrapolating between partitions.
Jan