I have tried doing make alltests and found that some things work, and some don’t.
I am copying the failures below. Maybe this has everything to do with petsc not being properly set up? Or at least not knowing the path?
I am happy to try whatever you suggest.
================================================================================ FAILURES =================================================================================
________________________________________________________________________ test_assemble_with_tensor ________________________________________________________________________
cg1 = <firedrake.functionspace.WithGeometry object at 0x2b4ee36e8690>
def test_assemble_with_tensor(cg1):
v = TestFunction(cg1)
L = v*dx
f = Function(cg1)
# Assemble a form into f
f = assemble(L, f)
# Assemble a different form into f
f = assemble(Constant(2)*L, f)
# Make sure we get the result of the last assembly
> assert np.allclose(f.dat.data, 2*assemble(L).dat.data, rtol=1e-14)
E assert <function allclose at 0x2b4dd64cd848>(array([ 0.04 , 0.01333333, 0.04 , 0.08 , 0.04 ,\n ... , 0.08 , 0.04 , 0.04 , 0.04 ,\n 0.01333333]), (2 * array([ 0., 0., 0., 0., 0., 0.,
0., 0., 0., 0., 0., 0., 0.,\n ..., 0., 0., 0., 0.,\n 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.])), rtol=1e-14)
E + where <function allclose at 0x2b4dd64cd848> = np.allclose
E + and array([ 0.04 , 0.01333333, 0.04 , 0.08 , 0.04 ,\n ... , 0.08 , 0.04 , 0.04 , 0.04 ,\n 0.01333333]) = Dat(DataSet(Set((36, 36, 36, 36), 'None_nodes'), (1,), 'None_nodes_dset'),
None, dtype('float64'), 'function_8641').data
E + where Dat(DataSet(Set((36, 36, 36, 36), 'None_nodes'), (1,), 'None_nodes_dset'), None, dtype('float64'), 'function_8641') = Coefficient(FunctionSpace(Mesh(VectorElement('Lagrange', triangle, 1, dim=2), 8534), FiniteElement('Lagrange', triangle,
1)), 12698).dat
E + and array([ 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,\n ..., 0., 0., 0., 0.,\n 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]) = Dat(DataSet(Set((36, 36, 36, 36), 'None_nodes'), (1,), 'None_nodes_dset'),
None, dtype('float64'), 'function_8641').data
E + where Dat(DataSet(Set((36, 36, 36, 36), 'None_nodes'), (1,), 'None_nodes_dset'), None, dtype('float64'), 'function_8641') = Coefficient(FunctionSpace(Mesh(VectorElement('Lagrange', triangle, 1, dim=2), 8534), FiniteElement('Lagrange', triangle,
1)), 12701).dat
E + where Coefficient(FunctionSpace(Mesh(VectorElement('Lagrange', triangle, 1, dim=2), 8534), FiniteElement('Lagrange', triangle, 1)), 12701) = assemble(Form([Integral(Argument(FunctionSpace(Mesh(VectorElement('Lagrange', triangle,...VectorElement('Lagrange',
triangle, 1, dim=2), 8534), 'everywhere', {}, None)]))
tests/regression/test_assemble.py:83: AssertionError
_________________________________________________________________ test_assemble_rhs_with_without_constant _________________________________________________________________
V = <firedrake.functionspace.WithGeometry object at 0x2b4f28b15550>
def test_assemble_rhs_with_without_constant(V):
cache = assembly_cache.AssemblyCache()
cache.clear()
v = TestFunction(V)
f = Function(V)
f = assemble(v*dx, f)
f = assemble(Constant(2)*v*dx, f)
assert cache.num_objects == 2
> assert np.allclose(f.dat.data_ro, 2 * assemble(v*dx).dat.data_ro)
E assert <function allclose at 0x2b4dd64cd848>(array([ 0.04 , 0.01333333, 0.04 , 0.08 , 0.04 ,\n ... , 0.08 , 0.04 , 0.04 , 0.04 ,\n 0.01333333]), (2 * array([ 0., 0., 0., 0., 0., 0.,
0., 0., 0., 0., 0., 0., 0.,\n ..., 0., 0., 0., 0.,\n 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.])))
E + where <function allclose at 0x2b4dd64cd848> = np.allclose
E + and array([ 0.04 , 0.01333333, 0.04 , 0.08 , 0.04 ,\n ... , 0.08 , 0.04 , 0.04 , 0.04 ,\n 0.01333333]) = Dat(DataSet(Set((36, 36, 36, 36), 'None_nodes'), (1,), 'None_nodes_dset'),
None, dtype('float64'), 'function_8653').data_ro
E + where Dat(DataSet(Set((36, 36, 36, 36), 'None_nodes'), (1,), 'None_nodes_dset'), None, dtype('float64'), 'function_8653') = Coefficient(FunctionSpace(Mesh(VectorElement('Lagrange', triangle, 1, dim=2), 8651), FiniteElement('Lagrange', triangle,
1)), 12714).dat
E + and array([ 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,\n ..., 0., 0., 0., 0.,\n 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]) = Dat(DataSet(Set((36, 36, 36, 36), 'None_nodes'), (1,), 'None_nodes_dset'),
None, dtype('float64'), 'function_8653').data_ro
E + where Dat(DataSet(Set((36, 36, 36, 36), 'None_nodes'), (1,), 'None_nodes_dset'), None, dtype('float64'), 'function_8653') = Coefficient(FunctionSpace(Mesh(VectorElement('Lagrange', triangle, 1, dim=2), 8651), FiniteElement('Lagrange', triangle,
1)), 12717).dat
E + where Coefficient(FunctionSpace(Mesh(VectorElement('Lagrange', triangle, 1, dim=2), 8651), FiniteElement('Lagrange', triangle, 1)), 12717) = assemble((Argument(FunctionSpace(Mesh(VectorElement('Lagrange', triangle, 1, dim=2), 8651), FiniteElement('Lagrange',
triangle, 1)), 0, None) * dx))
tests/regression/test_assembly_cache.py:100: AssertionError
________________________________________________________________________ test_solve_then_assemble _________________________________________________________________________
V = <firedrake.functionspace.WithGeometry object at 0x2b4f28b15550>
def test_solve_then_assemble(V):
cache = assembly_cache.AssemblyCache()
cache.clear()
u = TrialFunction(V)
v = TestFunction(V)
a = u*v*dx
L = v*dx
f = Function(V)
A = assemble(a)
b = assemble(L)
solve(A, f, b)
assert np.allclose(f.dat.data, 1)
> assert np.allclose(assemble(L).dat.data, b.dat.data)
E assert <function allclose at 0x2b4dd64cd848>(array([ 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,\n ..., 0., 0., 0., 0.,\n 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]), array([ 0.02 , 0.00666667, 0.02
, 0.04 , 0.02 ,\n ... , 0.04 , 0.02 , 0.02 , 0.02 ,\n 0.00666667]))
E + where <function allclose at 0x2b4dd64cd848> = np.allclose
E + and array([ 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,\n ..., 0., 0., 0., 0.,\n 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]) = Dat(DataSet(Set((36, 36, 36, 36), 'None_nodes'), (1,), 'None_nodes_dset'),
None, dtype('float64'), 'function_8683').data
E + where Dat(DataSet(Set((36, 36, 36, 36), 'None_nodes'), (1,), 'None_nodes_dset'), None, dtype('float64'), 'function_8683') = Coefficient(FunctionSpace(Mesh(VectorElement('Lagrange', triangle, 1, dim=2), 8651), FiniteElement('Lagrange', triangle,
1)), 12776).dat
E + where Coefficient(FunctionSpace(Mesh(VectorElement('Lagrange', triangle, 1, dim=2), 8651), FiniteElement('Lagrange', triangle, 1)), 12776) = assemble(Form([Integral(Argument(FunctionSpace(Mesh(VectorElement('Lagrange', triangle,...VectorElement('Lagrange',
triangle, 1, dim=2), 8651), 'everywhere', {}, None)]))
E + and array([ 0.02 , 0.00666667, 0.02 , 0.04 , 0.02 ,\n ... , 0.04 , 0.02 , 0.02 , 0.02 ,\n 0.00666667]) = Dat(DataSet(Set((36, 36, 36, 36), 'None_nodes'), (1,), 'None_nodes_dset'),
None, dtype('float64'), 'function_8683').data
E + where Dat(DataSet(Set((36, 36, 36, 36), 'None_nodes'), (1,), 'None_nodes_dset'), None, dtype('float64'), 'function_8683') = Coefficient(FunctionSpace(Mesh(VectorElement('Lagrange', triangle, 1, dim=2), 8651), FiniteElement('Lagrange', triangle,
1)), 12774).dat
tests/regression/test_assembly_cache.py:185: AssertionError
==================================================== 3 failed, 3480 passed, 89 skipped, 15 xfailed in 1170.17 seconds =====================================================
make: *** [test] Error 1
(firedrake)fpoulin@vortex:~/software/firedrake/src/firedrake$ Write failed: Broken pipe